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

Added Atari Boxing game #8

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Added Atari Boxing game #8

wants to merge 1 commit into from

Conversation

shahofblah
Copy link
Collaborator

@shahofblah shahofblah commented Jan 30, 2024

GPT4 base agent performs inferior to Random agent, most probably due to random agent being quicker and just taking more actions overall.

TODO

Make the gpt call async so we(and every other realtime game) can just use Python coroutines instead of mucking about with threads

@shahofblah shahofblah self-assigned this Jan 30, 2024
@acostarelli acostarelli requested review from acostarelli and removed request for Joshuaclymer and RomanHauksson February 1, 2024 21:16
@acostarelli
Copy link
Collaborator

GPT4Vision:

  • Add support for transparent_reasoning parameter. This should probably replace use of show_state and logging
  • I'm not sure we should be adding show_thought_process to the default agent; we have a Chain of Thought agent coming in another PR.

Checklist:
[x] Is there a script in /scripts that tests the game using the default GPT-4 agent (see examples)
[ ] Does the game run without errors?
[ ] Does the game finish in a reasonable amount of time? (within 5 minutes). If not, then the rules would probably need to be adjusted to shorten the duration.
[x] If the agent returns invalid actions, is this properly handled in the code, e.g. by retrying or by selecting a random action (you should eventually select a random action)

[ ] When 'show_state' is set to true, does the game state print in the terminal so that the code is debuggable?
I wasn't able to run the code yet, but is it possible for show_state to be turned off from the .sh script?
Use show_state and print instead of logging.
Graphical output should be controlled by show_state
[x] Does the game class have an init_game method that receives two agent classes as input? (even if these agent classes are used to make more agents that are on different teams).
[x] Does the class have an 'id' attribute with the name of the game?
[/] Does the class have a 'rules' attribute that explains the rules of the game?
It seems you discuss available actions in the rules. I think this information can be handled in available_action's instructions and action descriptions. Similarly, I think you can move descriptions of the observations to the observations themselves.

Additional:

  • play_game will be passing agent_1_kwargs and agent_2_kwargs to your game, so please consider them in agent instantiation
  • I'm not sure I'm a fan of the code specifically written for the random agent
  • Add specific commands to the readme for installing additional dependencies

@shahofblah shahofblah marked this pull request as draft February 2, 2024 14:17
@shahofblah shahofblah force-pushed the atari/boxing branch 3 times, most recently from 4ff96bc to e2456fd Compare February 29, 2024 00:23

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Changed the scoring instructions with more emphasis on head and fist alignment

Added 1. GPT4-vision as a model 2. Attached graphical board game state to query 3. Rendered board game state for human viewing via matplotlib.pyplt
@shahofblah
Copy link
Collaborator Author

Addressed all comments

  1. Game runs properly now
  2. Game finishes in time. The maximum time the game runs for can be adjusted in the max_cycles=1000 parameter sent to boxing_v2.env() function inside AtariBoxing class, line 135, games/atari/boxing.py

When 'show_state' is set to true, does the game state print in the terminal so that the code is debuggable?

Yes. I still use logging, but the log level set depends on the value of show_state.

is it possible for show_state to be turned off from the .sh script?

This is not the case currently. The Game class and fire functions don't allow sending params like agent_kwargs for agents. The value of this variable can be modified within the code.

It seems you discuss available actions in the rules. I think this information can be handled in available_action's
instructions and action descriptions. Similarly, I think you can move descriptions of the observations to the observations themselves.

Made these changes.

play_game will be passing agent_1_kwargs and agent_2_kwargs to your game, so please consider them in agent instantiation

Done

I'm not sure I'm a fan of the code specifically written for the random agent

Changed it so that agent sleeps if game state has not changed since last time.

Add specific commands to the readme for installing additional dependencies

Added installation section with commands

@shahofblah shahofblah marked this pull request as ready for review February 29, 2024 01:00
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 this pull request may close these issues.

None yet

2 participants