BradenEverson / earthmover

Embedded RL with modular rewards based on peripherals and a simulation server for deciding best actions
MIT License
4 stars 2 forks source link

feat: initial workings of simulation executor #13

Closed BradenEverson closed 1 month ago

BradenEverson commented 1 month ago

Small PR to show off the initial design I have for the simulation engine. Basically we have this simulate function that will take in all of the args necessary to create a standalone simulation (all points in n-space, agent's body, agent's configuration) and generate the simulation. It will then go through some set of cycles to find the best fitness it thinks it can find. It will return this fitness value along with a set of instructions to reach that value as a SimRes struct.

The Orchestrator is able to create and execute several of these simulations in parallel. It has a function for loading these simulations where it will add some amount of them to a FuturesUnordered. It then has a run method for awaiting the execution of all of these simulations, evaluating the fitness of each, and selecting the best one.

There's still a lot of work here for the simulation stuff, but I wanted to show my initial thoughts on design before I went too forward with anything.