This repo provide the source code for the RLChina Competition - Gui Mao Winter Season
Jidi supports online evaluation service for various games/simulators/environments/testbeds. Website: www.jidiai.cn.
A tutorial on Jidi: Tutorial
The competition uses an integrated version of OvercookedAI games
-
The integrated game contains three official maps, they are:
- Cramped Room Tomato;
- Forced Coordination Tomato;
- Soup Coordination
Config details can be found in layouts
-
The game proceed by putting both agents sequentially in these three maps and ask them to prepare orders by cooperating with the other player. The ending state in a map is followed by an initial state in the next map and the agent observation will be marked new_map=True
-
Each map will be run twice with agent index switched. For example in map one, player one controls agent one and player two controls agent two and they switch position and re-start the map when reaching an end. Thus, two players will play on three maps for six rounds in total.
-
Each map last for 400 timesteps. The total episode length of the integrated game is 2400.
-
Each agent observation global game state, the agent index and the new map indicator. The gloabl game state includes:
- players: position and orientation of two characters and the held objects.
- objects: the information and position of objects in the map.
- bounus orders
- all orders
- timestep: timestep in the current map
-
Each agent has six action choices, they are:
- Move Up
- Move Down
- Move Right
- Move Left
- Stay Still
- Interact
-
We use the default reward shaping, that is the value for each successful orders (x2 if bounus order). We will sum up all rewards in all maps as the score for one episode.
You can use any tool to manage your python environment. Here, we use conda as an example.
conda create -n overcookai-venv python==3.7.5 #3.8, 3.9
conda activate overcookai-venv
Next, clone the repository and install the necessary dependencies:
git clone https://github.com/jidiai/Competition_OvercookedAI-2.git
cd Competition_OvercookedAI-2
pip install -r requirements.txt
Finally, run the game by executing:
python run_log.py
We provide two visualization method:
- Console: set
self.render_mode="console"
inenv/overcookedai_integrated.py
and the game map will be displayed as string on the console. - Window: set
self.render_mode="window"
and the game map will be displayed in a seperated pygame window.
|-- Competition_OvercookedAI-2
|-- agents // Agents that act in the environment
| |-- random // A random agent demo
| | |-- submission.py // A ready-to-submit random agent file
|-- env // scripts for the environment
| |-- config.py // environment configuration file
| |-- overcookedai_integrated.py // The environment wrapper
|-- utils
|-- run_log.py // run the game with provided agents (same way we evaluate your submission in the backend server)
-
You can train your own agents using any framework you like as long as using the provided environment wrapper.
-
For your ready-to-submit agent, make sure you check it using the
run_log.py
scrips, which is exactly how we evaluate your submission. -
run_log.py
takes agents from pathagents/
and run a game. For example:
python run_log.py --my_ai "random" --opponent "random"
set both agents as a random policy and run a game.
- You can put your agents in the
agent/
folder and create asubmission.py
with amy_controller
function in it. Then run therun_log.py
to test:
python run_log.py --my_ai your_agent_name --opponent xxx
- If you pass the test, then you can submit it to the Jidi platform. You can make multiple submission and the previous submission will be overwritten.