Open 123456djtdjt opened 1 year ago
Hi @123456djtdjt ,
you can add second agent as;
1-Copy line https://github.com/harfang3d/dogfight-sandbox-hg2/blob/main/Agent/Train.py#L52 paste to line 53, change name to "agent_2" .
in line https://github.com/harfang3d/dogfight-sandbox-hg2/blob/main/Agent/HarfangEnv_GYM.py#L11 and Line 12 as you can see we define 2 aircraft, oppo and ally. we have 2 aircraft but only single agent. if you want to add second agent, check functions in line https://github.com/harfang3d/dogfight-sandbox-hg2/blob/main/Agent/HarfangEnv_GYM.py#L65. you need to modify these lines.
if you undestand single agent code, you can easily add second agent.
Hi @123456djtdjt ,
you can add second agent as;
1-Copy line https://github.com/harfang3d/dogfight-sandbox-hg2/blob/main/Agent/Train.py#L52 paste to line 53, change name to "agent_2" .
in line https://github.com/harfang3d/dogfight-sandbox-hg2/blob/main/Agent/HarfangEnv_GYM.py#L11 and Line 12 as you can see we define 2 aircraft, oppo and ally. we have 2 aircraft but only single agent. if you want to add second agent, check functions in line https://github.com/harfang3d/dogfight-sandbox-hg2/blob/main/Agent/HarfangEnv_GYM.py#L65. you need to modify these lines.
if you undestand single agent code, you can easily add second agent.
It is kind of you to tell me that,but I'm interested in how to control a team of agents to fight against another team of agents contolled by IA.Maybe I need to think about it more.Thanks for your advice anyway!
Hi @123456djtdjt ,
you can add second agent as;
1-Copy line https://github.com/harfang3d/dogfight-sandbox-hg2/blob/main/Agent/Train.py#L52 paste to line 53, change name to "agent_2" .
in line https://github.com/harfang3d/dogfight-sandbox-hg2/blob/main/Agent/HarfangEnv_GYM.py#L11 and Line 12 as you can see we define 2 aircraft, oppo and ally. we have 2 aircraft but only single agent. if you want to add second agent, check functions in line https://github.com/harfang3d/dogfight-sandbox-hg2/blob/main/Agent/HarfangEnv_GYM.py#L65. you need to modify these lines.
if you undestand single agent code, you can easily add second agent.
Hi, there is a problem when I run Train.py as follows: dogfight_sandbox_hg2/Agent/HarfangEnv_GYM.py", line 130, in _get_observation target_angle = plane_state['target_angle']/360 KeyError: 'target_angle'
Hi @123456djtdjt , you can add second agent as; 1-Copy line https://github.com/harfang3d/dogfight-sandbox-hg2/blob/main/Agent/Train.py#L52 paste to line 53, change name to "agent_2" . in line https://github.com/harfang3d/dogfight-sandbox-hg2/blob/main/Agent/HarfangEnv_GYM.py#L11 and Line 12 as you can see we define 2 aircraft, oppo and ally. we have 2 aircraft but only single agent. if you want to add second agent, check functions in line https://github.com/harfang3d/dogfight-sandbox-hg2/blob/main/Agent/HarfangEnv_GYM.py#L65. you need to modify these lines. if you undestand single agent code, you can easily add second agent.
Hi, there is a problem when I run Train.py as follows: dogfight_sandbox_hg2/Agent/HarfangEnv_GYM.py", line 130, in _get_observation target_angle = plane_state['target_angle']/360 KeyError: 'target_angle'
Same problem,did you solve it?
Hey,I'm interested in Multiagent Dogfight,I'd appreciate it if you can share me the code of the multiagent-agent reinforcement learning.