Status of AI in FlightGear: Difference between revisions

m
Line 250: Line 250:
     |author=<nowiki>Hooray</nowiki>
     |author=<nowiki>Hooray</nowiki>
     |date=<nowiki>Thu Aug 02</nowiki>
     |date=<nowiki>Thu Aug 02</nowiki>
  }}
}}
== Neural Networks ==
{{FGCquote
  |the AI in its current form is fortunately still hard coded and not based on [http://en.wikipedia.org/wiki/Artificial_neural_network neural networks], otherwise they may even predict your actions/evasive maneuvers
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=86630&sid=f642c30958be668ab3082d7fec56be32#p86630
    |title=<nowiki>Re: AI & MP Dogfighting now working! Bombable ships, aircraft...</nowiki>
    |author=<nowiki>Hooray</nowiki>
    |date=<nowiki>Thu Jul 08</nowiki>
  }}
}}
{{FGCquote
  |If you know Nasal, you could certainly teach bombable to become a bit smarter, i.e. by adding support for standard combat maneuvers (like you mentioned). In its simplest form you could code a state machine that responds to standard situations with a randomly chosen standard response (and maybe some dynamic variation). It would be a matter of coming up with a state machine implementation in Nasal so that the AI can match up situations against suitable responses. It is definitely possible. I was in fact talking to flug a while ago about adding neural network-based AI to bombable. If there are enough people interested in this aspect of making bombable even smarter, then we could certainly come up with some more challenging AI bots.
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=140015&sid=45d53ccb09ba0869e875fe5ce253c3b8#p140015
    |title=<nowiki>Re: AI & MP Dogfighting now working! Bombable ships, aircraf</nowiki>
    |author=<nowiki>Hooray</nowiki>
    |date=<nowiki>Tue Oct 11</nowiki>
  }}
}}
{{FGCquote
  |I just looked into bombable's Nasal code, and it seems really not only well commented but also pretty well structured and generalized already, and I think another possibility to balance the whole experience would be to provide an option for setting up AI bots (or wingmen) to help you fight the bad boys. <br/>
<br/>
Pretty much like AI bots that help you defend/protect an objective - while helping fight other AI bots.<br/>
<br/>
One possible method would be to set up an option to spawn friendly forces on demand. To come and help you. Either using a hotkey or a GUI dialog.<br/>
They could either be spawned at a configurable fixed position (i.e. KSFO) or within a configurable range of your current position (say 20 miles).<br/>
<br/>
There is also some good information available on creating autonomous dogfight agents: [http://www.kbs.twi.tudelft.nl/docs/MSc/2005/Solinger_David/thesis.pdf CREATING A DOGFIGHT AGENT: The design and implementation of a fully autonomous agent that can fly an airplane during a one-to-one dogfight].
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=86696&sid=313660611da3e2e0cc270be9151e6594#p86696
    |title=<nowiki>Re: AI & MP Dogfighting now working! Bombable ships, aircraft...</nowiki>
    |author=<nowiki>Hooray</nowiki>
    |date=<nowiki>Fri Jul 09</nowiki>
  }}
}}
{{FGCquote
  |Basically, the technique is now called "[http://en.wikipedia.org/wiki/Adaptive_control adaptive control systems]", which resulted in "self-reconfiguring bots" that could really learn things like controlling a simulated aircraft.<br/>
<br/>
This "learning" was based on a "punish/reward" system, and these agents were actually able to cooperate to a certain degree, to achieve their goals.<br/>
<br/>
In fact, these "Norns" were even so good at doing their job in the simulated world, that they were immediately used to fly real aircraft, namely UAVs
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=86696&sid=313660611da3e2e0cc270be9151e6594#p86696
    |title=<nowiki>Re: AI & MP Dogfighting now working! Bombable ships, aircraft...</nowiki>
    |author=<nowiki>Hooray</nowiki>
    |date=<nowiki>Fri Jul 09</nowiki>
  }}
}}
{{FGCquote
  |We talked about this a number of times, and the bombable developer (flug) repeatedly indicated an interest in adding this
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=161287&sid=cdbcaaa2eec329e95718082e84d7a04d#p161287
    |title=<nowiki>Re: Possibility of incorporating "learning" AI?</nowiki>
    |author=<nowiki>Hooray</nowiki>
    |date=<nowiki>Sat Jul 07</nowiki>
  }}
}}
{{FGCquote
  |I like this idea a lot.<br/>
<br/>
One basic problem is that Bombable is basically sitting on top of the FG AI flight system, which is indeed designed to make aircraft fly "like airliners". <br/>
<br/>
But, especially if there is interest to make like a neural net type intelligent/learning system for AI fighter aircraft I think both the Bombable and Flightgear problems could rather easily be solved.  The changes that would be required in FlightGear's C code are not that difficult, I believe.
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=140349&sid=45d53ccb09ba0869e875fe5ce253c3b8#p140349
    |title=<nowiki>Re: AI & MP Dogfighting now working! Bombable ships, aircraf</nowiki>
    |author=<nowiki>flug</nowiki>
    |date=<nowiki>Fri Oct 14</nowiki>
  }}
}}
{{FGCquote
  |Right now, the Bombable aircraft only do three things:<br/>
<br/>
1. Steer directly towards you if you are within their detection range  (and steering towards you means, both in heading and altitude)<br/>
2. Wait until they have passed you by a certain distance to steer back towards you<br/>
3. Dodge if you shoot close to them or hit them<br/>
<br/>
They also try to avoid crashing into the ground a few other basic things like that.<br/>
<br/>
Considering the very, very basic nature of their behavior programming, they actually engage in some pretty complex behavior.
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=140351&sid=4aa5400d0368eaa508a44abd83e43073#p140351
    |title=<nowiki>Re: AI & MP Dogfighting now working! Bombable ships, aircraf</nowiki>
    |author=<nowiki>flug</nowiki>
    |date=<nowiki>Fri Oct 14</nowiki>
  }}
}}
{{FGCquote
  |However it is only (and is only intended to be) a proof of concept--that we can control the AI aircraft within FG, using fairly simple nasal scripting and pretty simple behavior patterns, and make some pretty interesting behavior out of it.<br/>
<br/>
I think if we were to implement an idea like Hooray's we could have some very interesting AI aircraft flying indeed, and it probably wouldn't need to be that hard or complicated.<br/>
<br/>
As I've mentioned in a few other messages, Bombable is always limited by FG's native AI flight system, which is very sedate both as far as turning and (even more so) climbing &amp; diving.  It's really designed to model airliners flying sedately from there to there &amp; it will take just a few changes to the underlying C code to make more complex &amp; aggressive maneuvers possible.<br/>
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=140351&sid=4aa5400d0368eaa508a44abd83e43073#p140351
    |title=<nowiki>Re: AI & MP Dogfighting now working! Bombable ships, aircraf</nowiki>
    |author=<nowiki>flug</nowiki>
    |date=<nowiki>Fri Oct 14</nowiki>
   }}
   }}
}}
}}