Changes

Jump to: navigation, search

Status of AI in FlightGear

2,041 bytes added, 09:56, 26 June 2014
Scripted AI Missiles
|author=<nowiki>Hooray</nowiki>
|date=<nowiki>Sun May 05</nowiki>
}}
}}
 
== AI ATC vs. AI Pilot Interactions ==
{{FGCquote
|it seems this should already be possible to some extent without any significant changes to the C++ source code, i.e. it should theoretically be possible to drive AI traffic largely by using Nasal scripts (see for example tanker.nas in CVS).<br/>
<br/>
In other words, anybody interested in making AI traffic fully ATC aware (in the sense of properly responding aircraft), would mostly have to do something along the lines of:<br/>
<br/>
<ul>
<li> set up an instance of a Nasal driven AI aircraft (see tanker.nas in CVS)</li>
<li> register a listener to the chat property in order to parse chat (ATC) messages</li>
<li> inside the registered listener, look for matching callsign of the corresponding aircraft (to see if transmission is relevant)</li>
<li> if callsign is correct, start parsing/validating the transmission (i.e. "HY77: Descend and maintain FL50")</li>
<li> acknowledge reception of transmission to virtual ATC</li>
<li> directly set the target-* properties under /ai/mod...li>
</ul>
<br/>
This scheme could be extended to manage a whole number of Nasal driven AI aircraft, i.e. using an "ai-pilot.nas" script.<br/>
<br/>
Similarly, the same thing may work the other way around, i.e. for AI aircraft scripts to write to the chat property in order to talk to the AI traffic system to request a clearance or vectors.<br/>
<br/>
Most of this stuff is directly possible and requires few changes or additions to the C++ code.<br/>
<br/>
Just the possibility of using Nasal to script AI aircraft behavior patterns is extremely useful and powerful.<br/>
<br/>
(One could even implement the AI ATC backend using Nasal by using the same approach, but that isn't as interesting due to the performance issues involved)
|{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=66463&sid=7d463c84e53286b9dada70fc2cbd629a#p66463
|title=<nowiki>Making AI traffic & ATC work together</nowiki>
|author=<nowiki>Hooray</nowiki>
|date=<nowiki>Wed Feb 24</nowiki>
}}
}}
19,484
edits

Navigation menu