Comments (3)
Right, also the states are potentially large JSON objects, not just arrays of numbers or bytes that you can optimize for. It's a hard one now that I think of, seems like all the simulation code and Macao integration functions need to be in a worker module and Macao calls it. So the user needs to put their code in a separate module explicitly, it's a more complex API and requirements no doubt
from macao.
Maybe this helps. Here's a pretty simple example of a server and browser workers that receive a large list of numbers and return some back.
https://github.com/wagenaartje/neataptic/tree/master/src/multithreading/workers
from macao.
@flesler I've hit a bit of a wall when it comes to multithreading Macao and it has to do with the way Workers and Node child_processes work. The main problem I'm having is that Macao's algorithm requires the Macao user to supply functions that allow Macao to 'play' the game. For multithreading to work, I have to find a way to pass these functions from the main thread to other threads. The problem is that multithreading in JS does not share memory and is done thru serialized message passing and you can't serialize a function, ergo I can't pass the functions to other threads. I have yet to find a solution. Do you have any ideas?
from macao.
Related Issues (11)
- The automated release is failing 🚨
- Design a paralellism interface
- Implement paralellism support for Node children_processes
- Implement paralellism support for Browser Web Workers
- Add root parallelization
- Change controller.ts to use the DefaultGameRules class HOT 1
- Implement compatibility with non-deterministic games HOT 3
- Implement compatibility with hidden information games HOT 4
- calculateReward only runs at the end HOT 1
- API docs link is broken
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from macao.