sholloway / agents-playground

MIT License
4 stars 0 forks source link

Create a new Sim via the UI. #65

Closed sholloway closed 1 year ago

sholloway commented 1 year ago

Currently the process to create a new sim is rather tedious. It is documented in the code base here: ./docs/creating_sims.md.

It would be preferable to be able to bootstrap a new sim by clicking a button or some kind of UI wizard.

Tasks

Considerations

Agent Playground User Project

The current design leverages three registries that are used to stitch a scene together; ENTITIES_REGISTRY, RENDERERS_REGISTRY, and the TASKS_REGISTRY.

The user needs a way to add and organize code. There are two obvious options.

  1. Create project specific directories.
  2. Create a universal directory.

Project Specific Workflow

For option 1, this is how most creative software works. The user somehow creates a new project and the software creates a folder or encapsulating file. This project is self contained. The benefit of this is it avoids collisions between projects and enables forking for fast experimentation. A basic workflow for this approach is.

  1. Launch the Agent Playground App. Imagine this is installed as a wheel.
  2. File -> New Simulation
  3. Open the New Sim wizard. This includes selecting a directory for where to create the sim project.
  4. Create a directory based on the user specified location and name.
  5. Populate the directory with the templates.
  6. Dynamically add the relevant paths to the Python app (how does development work?).
  7. Launch the new simulation.

Development Workflow

Thoughts

If the Agent Playground isn't changing from the user perspective, then loading the simulation should be from their project's perspective. Once scenario is that the Playground is running and they've got their sim open in VSCode. Then they just keep hitting a reload button as they're making changes. Another scenario is they're launching the Playground from their sim project. This is how SimPy works.

The idea that a Simulation Project is really a python module is pretty powerful. We could have something like: my_sim (directory)

Universal, Flat Directory

For option 2, there is a shared directory that everything is stored in. This is similar to how tools like Maven create a global repository. It could be flat. The benefit is this can save hard drive space (who cares) and allow reuse of functions from sim to sim. In this approach it is up to the user to maintain a naming convention to avoid collisions.