Ewoluowanie neuronowych mózgów w JavaScript, wielowątkowo!

Brainhub
BrainhubBrainhub
Evolving neural brains in
JavaScript, multi-threaded!
@Lukasz-pluszczewski
github.com/Lukasz-pluszczewski
multithreading in Node.js
why?
simulation — how? did it work?
agenda:
why
why
why
Ewoluowanie neuronowych mózgów w JavaScript, wielowątkowo!
directed by "natural" selection only
behaviours not scripted
random changes
goals:
neural networks
neural networks
10
10
5
neural networks
10 x 0
10 x -0.1
5 x 0.3
neural networks
10 x 0
10 x -0.1
5 x 0.3
Tanh
neural networks
neural networks
10 x 0
10 x -0.1
5 x 0.3
0.46
Tanh
neural networks
neural networks
simulation
simulation
simulation
simulation
simulation
simulation
simulation
simulation
simulation
simulation
simulation
simulation
simulation
simulation
simulation
simulation
simulation
simulation
simulation
simulation
simulation
simulation 1
simulation 1
simulation 1
simulation 2
multithreading
in Node.js
Multicore!!!111!
POWERFULL
POWERFULL
communication through IPC
spawns separate Node.js process
heavy
child_process:
light weight
runs new event loop in a separate thread
the same process
worker_threads
memory block can be transfered
(ArrayBuffer)
and even shared (SharedArrayBuffer)
worker_threads
threads.js
threads.js
threads.js
threads.js
threads.js
threads.js
threads.js
WAT?
generation: 138ms
calculating inputs: 2µs
synchronous
generation: 543ms
calculating inputs: 22µs
async
async with inputs calculated in threads
generation: 1s
calculating inputs: 713µs
WAT?
generation: 138ms
calculating inputs: 2µs
synchronous
generation: 162ms
calculating inputs: 3.1µs
async
async with inputs calculated in threads
generation: 291ms
calculating inputs: 15µs
conclusions & what next
conclusions & what next
generation: 138ms
calculating inputs: 2µs
synchronous
generation: 162ms
calculating inputs: 3.1µs
async
async with inputs calculated in threads
generation: 291ms
calculating inputs: 15µs
conclusions & what next
hard to create right conditions
hyperparameter optimization
neural networks are hard
many variables to optimize
right amount for work
multithreading is not always better
useful links
https://github.com/Lukasz-pluszczewski/creatures
https://www.oreilly.com/library/view/learning-
tensorflowjs/9781492090786/
https://towardsdatascience.com/how-to-choose-the-right-
activation-function-for-neural-networks-3941ff0e6f9c
resources:
thank you
1 of 60

Recommended

Deep Learning for Computer Vision - PyconDE 2017 by
Deep Learning for Computer Vision - PyconDE 2017Deep Learning for Computer Vision - PyconDE 2017
Deep Learning for Computer Vision - PyconDE 2017Alex Conway
1K views125 slides
Getting your hands dirty with deep learning in java by
Getting your hands dirty with deep learning in javaGetting your hands dirty with deep learning in java
Getting your hands dirty with deep learning in javaDave Snowdon
234 views103 slides
Deep Dive on Deep Learning (June 2018) by
Deep Dive on Deep Learning (June 2018)Deep Dive on Deep Learning (June 2018)
Deep Dive on Deep Learning (June 2018)Julien SIMON
56.4K views52 slides
Machine Learning Workshop by
Machine Learning WorkshopMachine Learning Workshop
Machine Learning WorkshopGDSCTUe
162 views9 slides
Weaponizing Neural Networks. In your browser! by
Weaponizing Neural Networks. In your browser!Weaponizing Neural Networks. In your browser!
Weaponizing Neural Networks. In your browser!DefCamp
233 views38 slides
introduction to deeplearning by
introduction to deeplearningintroduction to deeplearning
introduction to deeplearningEyad Alshami
902 views36 slides

More Related Content

Similar to Ewoluowanie neuronowych mózgów w JavaScript, wielowątkowo!

A Platform for Accelerating Machine Learning Applications by
 A Platform for Accelerating Machine Learning Applications A Platform for Accelerating Machine Learning Applications
A Platform for Accelerating Machine Learning ApplicationsNVIDIA Taiwan
1.1K views32 slides
Deep Learning and Watson Studio by
Deep Learning and Watson StudioDeep Learning and Watson Studio
Deep Learning and Watson StudioSasha Lazarevic
979 views36 slides
Concurrency on the JVM by
Concurrency on the JVMConcurrency on the JVM
Concurrency on the JVMBernhard Huemer
1.2K views30 slides
Synthetic dialogue generation with Deep Learning by
Synthetic dialogue generation with Deep LearningSynthetic dialogue generation with Deep Learning
Synthetic dialogue generation with Deep LearningS N
778 views44 slides
convnets.pptx by
convnets.pptxconvnets.pptx
convnets.pptxMohamedAliHabib3
668 views38 slides
Artificial Neural networks by
Artificial Neural networksArtificial Neural networks
Artificial Neural networksLearnbay Datascience
25 views29 slides

Similar to Ewoluowanie neuronowych mózgów w JavaScript, wielowątkowo!(20)

A Platform for Accelerating Machine Learning Applications by NVIDIA Taiwan
 A Platform for Accelerating Machine Learning Applications A Platform for Accelerating Machine Learning Applications
A Platform for Accelerating Machine Learning Applications
NVIDIA Taiwan1.1K views
Synthetic dialogue generation with Deep Learning by S N
Synthetic dialogue generation with Deep LearningSynthetic dialogue generation with Deep Learning
Synthetic dialogue generation with Deep Learning
S N778 views
Artificial neural-network-paper-presentation-100115092527-phpapp02 by anandECE2010
Artificial neural-network-paper-presentation-100115092527-phpapp02Artificial neural-network-paper-presentation-100115092527-phpapp02
Artificial neural-network-paper-presentation-100115092527-phpapp02
anandECE201080 views
Artificial Neural Network Paper Presentation by guestac67362
Artificial Neural Network Paper PresentationArtificial Neural Network Paper Presentation
Artificial Neural Network Paper Presentation
guestac673626.8K views
Introduction to Deep Learning by Adam Rogers
Introduction to Deep LearningIntroduction to Deep Learning
Introduction to Deep Learning
Adam Rogers809 views
Convolutional Neural Networks for Computer vision Applications by Alex Conway
Convolutional Neural Networks for Computer vision ApplicationsConvolutional Neural Networks for Computer vision Applications
Convolutional Neural Networks for Computer vision Applications
Alex Conway746 views
Nibiru: Building your own NoSQL store by Edward Capriolo
Nibiru: Building your own NoSQL storeNibiru: Building your own NoSQL store
Nibiru: Building your own NoSQL store
Edward Capriolo571 views
Nibiru: Building your own NoSQL store by Edward Capriolo
Nibiru: Building your own NoSQL storeNibiru: Building your own NoSQL store
Nibiru: Building your own NoSQL store
Edward Capriolo113 views
PyConZA'17 Deep Learning for Computer Vision by Alex Conway
PyConZA'17 Deep Learning for Computer VisionPyConZA'17 Deep Learning for Computer Vision
PyConZA'17 Deep Learning for Computer Vision
Alex Conway1.5K views
Don't Start from Scratch: Transfer Learning for Novel Computer Vision Problem... by StampedeCon
Don't Start from Scratch: Transfer Learning for Novel Computer Vision Problem...Don't Start from Scratch: Transfer Learning for Novel Computer Vision Problem...
Don't Start from Scratch: Transfer Learning for Novel Computer Vision Problem...
StampedeCon392 views
Building web apps with node.js, socket.io, knockout.js and zombie.js - Codemo... by Ivan Loire
Building web apps with node.js, socket.io, knockout.js and zombie.js - Codemo...Building web apps with node.js, socket.io, knockout.js and zombie.js - Codemo...
Building web apps with node.js, socket.io, knockout.js and zombie.js - Codemo...
Ivan Loire31.4K views
Deep Neural Networks for Video Applications at the Edge by Alex Conway
Deep Neural Networks for Video Applications at the EdgeDeep Neural Networks for Video Applications at the Edge
Deep Neural Networks for Video Applications at the Edge
Alex Conway290 views
Deep Learning for Computer Vision - ExecutiveML by Alex Conway
Deep Learning for Computer Vision - ExecutiveMLDeep Learning for Computer Vision - ExecutiveML
Deep Learning for Computer Vision - ExecutiveML
Alex Conway1.1K views

More from Brainhub

Konfiguracja GitLab CI/CD pipelines od podstaw by
Konfiguracja GitLab CI/CD pipelines od podstawKonfiguracja GitLab CI/CD pipelines od podstaw
Konfiguracja GitLab CI/CD pipelines od podstawBrainhub
131 views11 slides
Solid.js - następca Reacta? by
Solid.js - następca Reacta?Solid.js - następca Reacta?
Solid.js - następca Reacta?Brainhub
51 views26 slides
Struktury algebraiczne w JavaScripcie by
Struktury algebraiczne w JavaScripcieStruktury algebraiczne w JavaScripcie
Struktury algebraiczne w JavaScripcieBrainhub
59 views71 slides
WebAssembly - czy dzisiaj mi się to przyda do pracy? by
WebAssembly - czy dzisiaj mi się to przyda do pracy?WebAssembly - czy dzisiaj mi się to przyda do pracy?
WebAssembly - czy dzisiaj mi się to przyda do pracy?Brainhub
46 views29 slides
Go home TypeScript, you're drunk! by
Go home TypeScript, you're drunk!Go home TypeScript, you're drunk!
Go home TypeScript, you're drunk!Brainhub
580 views17 slides
How I taught the messenger to tell lame jokes by
How I taught the messenger to tell lame jokesHow I taught the messenger to tell lame jokes
How I taught the messenger to tell lame jokesBrainhub
223 views88 slides

More from Brainhub(20)

Konfiguracja GitLab CI/CD pipelines od podstaw by Brainhub
Konfiguracja GitLab CI/CD pipelines od podstawKonfiguracja GitLab CI/CD pipelines od podstaw
Konfiguracja GitLab CI/CD pipelines od podstaw
Brainhub131 views
Solid.js - następca Reacta? by Brainhub
Solid.js - następca Reacta?Solid.js - następca Reacta?
Solid.js - następca Reacta?
Brainhub51 views
Struktury algebraiczne w JavaScripcie by Brainhub
Struktury algebraiczne w JavaScripcieStruktury algebraiczne w JavaScripcie
Struktury algebraiczne w JavaScripcie
Brainhub59 views
WebAssembly - czy dzisiaj mi się to przyda do pracy? by Brainhub
WebAssembly - czy dzisiaj mi się to przyda do pracy?WebAssembly - czy dzisiaj mi się to przyda do pracy?
WebAssembly - czy dzisiaj mi się to przyda do pracy?
Brainhub46 views
Go home TypeScript, you're drunk! by Brainhub
Go home TypeScript, you're drunk!Go home TypeScript, you're drunk!
Go home TypeScript, you're drunk!
Brainhub580 views
How I taught the messenger to tell lame jokes by Brainhub
How I taught the messenger to tell lame jokesHow I taught the messenger to tell lame jokes
How I taught the messenger to tell lame jokes
Brainhub223 views
The hunt of the unicorn, to capture productivity by Brainhub
The hunt of the unicorn, to capture productivityThe hunt of the unicorn, to capture productivity
The hunt of the unicorn, to capture productivity
Brainhub106 views
TDD in the wild by Brainhub
TDD in the wildTDD in the wild
TDD in the wild
Brainhub128 views
WebAssembly - kolejny buzzword, czy (r)ewolucja? by Brainhub
WebAssembly - kolejny buzzword, czy (r)ewolucja?WebAssembly - kolejny buzzword, czy (r)ewolucja?
WebAssembly - kolejny buzzword, czy (r)ewolucja?
Brainhub106 views
React performance by Brainhub
React performanceReact performance
React performance
Brainhub196 views
Introduction to RxJS by Brainhub
Introduction to RxJSIntroduction to RxJS
Introduction to RxJS
Brainhub3.7K views
React Native in a nutshell by Brainhub
React Native in a nutshellReact Native in a nutshell
React Native in a nutshell
Brainhub719 views
Ant Colony Optimization (Heuristic algorithms & Swarm intelligence) by Brainhub
Ant Colony Optimization (Heuristic algorithms & Swarm intelligence)Ant Colony Optimization (Heuristic algorithms & Swarm intelligence)
Ant Colony Optimization (Heuristic algorithms & Swarm intelligence)
Brainhub951 views
Technologia, a Startup - Brainhub by Brainhub
Technologia, a Startup - BrainhubTechnologia, a Startup - Brainhub
Technologia, a Startup - Brainhub
Brainhub441 views
Introduction to GraphQL by Brainhub
Introduction to GraphQLIntroduction to GraphQL
Introduction to GraphQL
Brainhub3.3K views
How should you React to Redux by Brainhub
How should you React to ReduxHow should you React to Redux
How should you React to Redux
Brainhub3.8K views
Wprowadzenie do React by Brainhub
Wprowadzenie do ReactWprowadzenie do React
Wprowadzenie do React
Brainhub787 views
JavaScript and Desktop Apps - Introduction to Electron by Brainhub
JavaScript and Desktop Apps - Introduction to ElectronJavaScript and Desktop Apps - Introduction to Electron
JavaScript and Desktop Apps - Introduction to Electron
Brainhub4.9K views
Why and How You Should Move from PHP to Node.js by Brainhub
Why and How You Should Move from PHP to Node.jsWhy and How You Should Move from PHP to Node.js
Why and How You Should Move from PHP to Node.js
Brainhub5.1K views
All you need to know about Callbacks, Promises, Generators by Brainhub
All you need to know about Callbacks, Promises, GeneratorsAll you need to know about Callbacks, Promises, Generators
All you need to know about Callbacks, Promises, Generators
Brainhub812 views

Recently uploaded

Design_Discover_Develop_Campaign.pptx by
Design_Discover_Develop_Campaign.pptxDesign_Discover_Develop_Campaign.pptx
Design_Discover_Develop_Campaign.pptxShivanshSeth6
55 views20 slides
CPM Schedule Float.pptx by
CPM Schedule Float.pptxCPM Schedule Float.pptx
CPM Schedule Float.pptxMathew Joseph
6 views5 slides
MongoDB.pdf by
MongoDB.pdfMongoDB.pdf
MongoDB.pdfArthyR3
51 views6 slides
GDSC Mikroskil Members Onboarding 2023.pdf by
GDSC Mikroskil Members Onboarding 2023.pdfGDSC Mikroskil Members Onboarding 2023.pdf
GDSC Mikroskil Members Onboarding 2023.pdfgdscmikroskil
68 views62 slides
Renewal Projects in Seismic Construction by
Renewal Projects in Seismic ConstructionRenewal Projects in Seismic Construction
Renewal Projects in Seismic ConstructionEngineering & Seismic Construction
6 views8 slides
BCIC - Manufacturing Conclave - Technology-Driven Manufacturing for Growth by
BCIC - Manufacturing Conclave -  Technology-Driven Manufacturing for GrowthBCIC - Manufacturing Conclave -  Technology-Driven Manufacturing for Growth
BCIC - Manufacturing Conclave - Technology-Driven Manufacturing for GrowthInnomantra
20 views4 slides

Recently uploaded(20)

Design_Discover_Develop_Campaign.pptx by ShivanshSeth6
Design_Discover_Develop_Campaign.pptxDesign_Discover_Develop_Campaign.pptx
Design_Discover_Develop_Campaign.pptx
ShivanshSeth655 views
MongoDB.pdf by ArthyR3
MongoDB.pdfMongoDB.pdf
MongoDB.pdf
ArthyR351 views
GDSC Mikroskil Members Onboarding 2023.pdf by gdscmikroskil
GDSC Mikroskil Members Onboarding 2023.pdfGDSC Mikroskil Members Onboarding 2023.pdf
GDSC Mikroskil Members Onboarding 2023.pdf
gdscmikroskil68 views
BCIC - Manufacturing Conclave - Technology-Driven Manufacturing for Growth by Innomantra
BCIC - Manufacturing Conclave -  Technology-Driven Manufacturing for GrowthBCIC - Manufacturing Conclave -  Technology-Driven Manufacturing for Growth
BCIC - Manufacturing Conclave - Technology-Driven Manufacturing for Growth
Innomantra 20 views
Design of machine elements-UNIT 3.pptx by gopinathcreddy
Design of machine elements-UNIT 3.pptxDesign of machine elements-UNIT 3.pptx
Design of machine elements-UNIT 3.pptx
gopinathcreddy38 views
Web Dev Session 1.pptx by VedVekhande
Web Dev Session 1.pptxWeb Dev Session 1.pptx
Web Dev Session 1.pptx
VedVekhande20 views
Unlocking Research Visibility.pdf by KhatirNaima
Unlocking Research Visibility.pdfUnlocking Research Visibility.pdf
Unlocking Research Visibility.pdf
KhatirNaima11 views
Ansari: Practical experiences with an LLM-based Islamic Assistant by M Waleed Kadous
Ansari: Practical experiences with an LLM-based Islamic AssistantAnsari: Practical experiences with an LLM-based Islamic Assistant
Ansari: Practical experiences with an LLM-based Islamic Assistant
M Waleed Kadous11 views
2023Dec ASU Wang NETR Group Research Focus and Facility Overview.pptx by lwang78
2023Dec ASU Wang NETR Group Research Focus and Facility Overview.pptx2023Dec ASU Wang NETR Group Research Focus and Facility Overview.pptx
2023Dec ASU Wang NETR Group Research Focus and Facility Overview.pptx
lwang78188 views

Ewoluowanie neuronowych mózgów w JavaScript, wielowątkowo!