@@ -31,6 +31,19 @@ docker-compose up -d
3131poetry run python tools/test_subscribe.py
3232```
3333
34+ ### Parallel Training (4 servers)
35+
36+ ``` bash
37+ # Start 4 independent Quake servers for parallel RL training
38+ docker-compose -f docker-compose.multi.yml up -d
39+
40+ # Each server uses a unique env_id for Redis namespacing:
41+ # Server 0: ql:0:agent:*, port 27960
42+ # Server 1: ql:1:agent:*, port 27961
43+ # Server 2: ql:2:agent:*, port 27962
44+ # Server 3: ql:3:agent:*, port 27963
45+ ```
46+
3447## How It Works
3548
3649```
@@ -84,16 +97,21 @@ Subscribe to `ql:game:state` for real-time JSON:
8497 "velocity" : {"x" : 0.0 , "y" : 0.0 , "z" : 0.0 },
8598 "view_angles" : {"pitch" : 0.0 , "yaw" : 180.0 , "roll" : 0.0 },
8699 "is_alive" : true ,
100+ "in_fov" : true ,
87101 "team" : " free"
88102 }
89103 ],
90104 "items" : [
91- {"name" : " item_armor_mega" , "position" : {"x" : 0 , "y" : 0 , "z" : 0 }, "is_available" : true , "spawn_time " : 0 },
92- {"name" : " item_health_mega" , "position" : {"x" : -384 , "y" : 640 , "z" : 32 }, "is_available" : false , "spawn_time " : 35000 }
105+ {"name" : " item_armor_mega" , "position" : {"x" : 0 , "y" : 0 , "z" : 0 }, "is_available" : true , "time_to_spawn_ms " : 0 },
106+ {"name" : " item_health_mega" , "position" : {"x" : -384 , "y" : 640 , "z" : 32 }, "is_available" : false , "time_to_spawn_ms " : 35000 }
93107 ],
94108 "game_in_progress" : true ,
95109 "game_type" : " duel" ,
96- "map_name" : " toxicity"
110+ "map_name" : " toxicity" ,
111+ "agent_kills" : 2 ,
112+ "agent_deaths" : 1 ,
113+ "server_time_ms" : 1704567890123 ,
114+ "game_time_ms" : 45000
97115}
98116```
99117
@@ -213,6 +231,16 @@ QuakeLiveInterface/
213231| ` ql:game:state ` | Server → Client | Game state at ~ 60Hz |
214232| ` ql:agent:command ` | Client → Server | Movement/action commands |
215233| ` ql:admin:command ` | Client → Server | Admin commands (restart, record) |
234+ | ` ql:game:events ` | Server → Client | Damage, frag, death, pickup events |
235+
236+ ### Parallel Environment Namespacing
237+
238+ For parallel training, channels are namespaced with ` env_id ` :
239+
240+ | Single Env | Parallel Env (id=0) | Parallel Env (id=1) |
241+ | ------------| ---------------------| ---------------------|
242+ | ` ql:game:state ` | ` ql:0:game:state ` | ` ql:1:game:state ` |
243+ | ` ql:agent:command ` | ` ql:0:agent:command ` | ` ql:1:agent:command ` |
216244
217245## Documentation
218246
0 commit comments