lcipolina commited on
Commit
6b20225
·
verified ·
1 Parent(s): 5770d0f

Newer version after the name change

Browse files
Files changed (1) hide show
  1. scripts/README.md +38 -0
scripts/README.md CHANGED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Scripts Folder
2
+
3
+ This directory contains various top-level scripts for running, training, and evaluating games.
4
+
5
+ ## Contents
6
+
7
+ 1. **simulate.py**
8
+ - Allows one to play one or more matches of an OpenSpiel game with various agent types (human, random_bot, llm, or trained agents).
9
+ - Uses a config dict to specify the environment, agent types, number of rounds, and so on.
10
+ - The `config` object is loaded from `configs.py` or can be replaced by a custom config in code.
11
+ - Usage example:
12
+ ```bash
13
+ python simulate.py --game tic_tac_toe --rounds 5 --player-types human random_bot
14
+ ```
15
+
16
+ 2. **configs.py**
17
+ - Contains predefined config dictionaries that specify the scenario. For instance,
18
+ `default_simulation_config()` sets up tic-tac-toe with 5 rounds, a seed of 42, and 2 players.
19
+ - One can create more advanced configs (like `advanced_config()`) for different games or scenarios.
20
+
21
+
22
+ 2. **train.py**
23
+ - Stub for training an RL agent.
24
+
25
+ 3. **evaluate.py**
26
+ - For systematically evaluating a trained agent across multiple episodes, seeds, or opponent types. Produces final metrics and logs.
27
+
28
+ 4. **run_experiment.py**
29
+ - Orchestrates multi-run experiments, hyperparameter sweeps, or repeated simulations with different seeds.
30
+
31
+ ## Typical Usage
32
+
33
+ - To play or test the environment with a mix of agents, run:
34
+ ```bash
35
+ python simulate.py \
36
+ --game tic_tac_toe \
37
+ --rounds 3 \
38
+ --player-types human random_bot