GithubHelp home page GithubHelp logo

Comments (4)

muraatozbek avatar muraatozbek commented on May 28, 2024

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.

from dogfight-sandbox-hg2.

123456djtdjt avatar 123456djtdjt commented on May 28, 2024

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!

from dogfight-sandbox-hg2.

cjmdd avatar cjmdd commented on May 28, 2024

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'

from dogfight-sandbox-hg2.

WangKeji avatar WangKeji commented on May 28, 2024

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?

from dogfight-sandbox-hg2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.