Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand the game logic to allow for N runs to be executed #668

Open
gabrielfior opened this issue Jan 27, 2025 · 4 comments · May be fixed by #669
Open

Expand the game logic to allow for N runs to be executed #668

gabrielfior opened this issue Jan 27, 2025 · 4 comments · May be fixed by #669
Assignees

Comments

@gabrielfior
Copy link
Contributor

-> Current setup allows for 1 run to be executed (until treasury is emptied), then manual setup is carried out (while agent sleeps), and then game restarts

It would be nice if we had a more flexible game setup - I'm thinking about an experiment container that contains everything:

→ Start foundry provider (using ape)
→ Run reset_balance_anvil.py
→ Start all 7 agents (deploy_local), use RPC_URL (anvil running inside container)
-> Here I expect some modification on the agent running logic, i.e. maybe an external ENV is set and the agent stops (so that it doesn't have to call wait and have the pod restart) - need to double-check best way to do this
→ Run scripts for generating reports
→ Kill pod (this should take ~ 3h)

The above idea is interesting because it removes the manual setup currently required for starting/pausing games, allowing for experiments to be carried out much faster.

@gabrielfior gabrielfior added the question Further information is requested label Jan 27, 2025
@gabrielfior
Copy link
Contributor Author

@kongzii curious about your thoughts here, maybe this can be done using a diferent design?

@kongzii
Copy link
Contributor

kongzii commented Jan 28, 2025

We already talked about running all agents in one container. That brings more complexity than it solves.

Don't we just need to:

  1. Change this sleep to something lower (like 5 minutes)
  2. Write a cronjob that will run every 5 minutes or so, and it will check if the game is at the end, and if so, it will generate that report and it will reset the anvil to the initial state.

Agents are already configured to pick that up and they will continue the next round automatically.

Maybe (2) will need to be part of anvil container itself, but that isn't an issue.

@gabrielfior
Copy link
Contributor Author

gabrielfior commented Jan 28, 2025

Change this sleep to something lower (like 5 minutes)

Not only reduce the sleeping time but also avoid it doing reflections multiple times (if wait time ends and game is still over).

Write a cronjob that will run every 5 minutes or so, and it will check if the game is at the end, and if so, it will generate that report and it will reset the anvil to the initial state.

Sounds good. So do we agree on the steps above? If yes, happy to get started with this ticket.

@kongzii
Copy link
Contributor

kongzii commented Jan 28, 2025

but also avoid it doing reflections multiple times (if wait time ends and game is still over).

True! We need to modify that callback to optionally not resume the iteration, but to stop it, if the game is still off.

@gabrielfior gabrielfior removed the question Further information is requested label Jan 29, 2025
@gabrielfior gabrielfior self-assigned this Jan 29, 2025
@gabrielfior gabrielfior linked a pull request Jan 30, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants