Status of AI in FlightGear: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
m (→‎Fully Automatized Missions: FIXME: Instant-Cquotes doesn't yet seem to handle youtube embedding)
mNo edit summary
Line 30: Line 30:
     |author=<nowiki>Hooray</nowiki>
     |author=<nowiki>Hooray</nowiki>
     |date=<nowiki>Fri Feb 08</nowiki>
     |date=<nowiki>Fri Feb 08</nowiki>
  }}
}}
== Scripted AI in FlightGear ==
{{FGCquote
  |Another example is the "tanker.nas" script in $FG_ROOT which implements a simple scripted AI tanker for AAR purposes: [http://flightgear.org/forums/search.php?st{{=}}0&amp;sk{{=}}t&amp;sd{{=}}d&amp;sr{{=}}posts&amp;keywords{{=}}tanker.nas search.php?st{{=}}0&amp;sk{{=}}t&amp;sd{{=}}d&amp;sr{{=}}posts&amp;keywords{{=}}tanker.nas]<br/>
[http://www.mail-archive.com/search?q{{=}}tanker&amp;l{{=}}flightgear-devel%40lists.sourceforge.net http://www.mail-archive.com/search?q{{=}}ta ... eforge.net]<br/>
<br/>
And then we have the fox2.nas script which implements a fox2 AI missile using Nasal: [http://flightgear.org/forums/search.php?st{{=}}0&amp;sk{{=}}t&amp;sd{{=}}d&amp;sr{{=}}posts&amp;keywords{{=}}fox2.nas search.php?st{{=}}0&amp;sk{{=}}t&amp;sd{{=}}d&amp;sr{{=}}posts&amp;keywords{{=}}fox2.nas]<br/>
<br/>
The "bombable" addon is completely implemented in Nasal and created multiple virtual pilots for dogfighting purposes: [[Bombable]]<br/>
<br/>
<div id{{=}}"video"><iframe width{{=}}"420" height{{=}}"315" src{{=}}"http://www.youtube.com/embed/LL7bdHrR8uI" frameborder{{=}}"0" allowfullscreen{{=}}""></iframe></div>
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=176169&sid=8f59a726b35a77c7a89ef3ccfcab542d#p176169
    |title=<nowiki>Re: Possibility to run a fully automatized mission ?</nowiki>
    |author=<nowiki>Hooray</nowiki>
    |date=<nowiki>Mon Feb 04</nowiki>
   }}
   }}
}}
}}

Revision as of 09:29, 26 June 2014

AI Scenarios vs. Scripting

Cquote1.png I have the feeling they're a bit of a legacy feature. The AI system is pretty limited in what you can do, so AI gets replaced by more versatile Nasal solutions.


Compare tanker.nas with the AI aerial refueling demos - you can call the Nasal-spawned tanker everywhere when you're out of fuel, it interactively can provide you instructions to reach it, it automatically selects the tanker apprpriate for what you're flying,...

Compare the thermal demo with Advanced Weather - the AI thermals are on pre-defined locations, so there's just zero element of surprise in glider flight, you have to do a lot of preparation up-front in order to get gliding in a different location - Advanced Weather just generates them anywhere in the world, merged right into the other weather patterns,...

Nasal in static models makes them interact with aircraft, no need to pre-define AI or pre-load anything.

So if not for the Carriers, I think we could safely get rid of the AI scenarios - Nasal-driven Wingmen would be far superior in interactivity.


— Thorsten (Fri Feb 08). Re: AI-Scenarios.
(powered by Instant-Cquotes)
Cquote2.png
Cquote1.png have to agree completely with Thorsten here. Scripting via Nasal makes it possible to move development of such features to the base package and delegate it to "user space" (contributors not core developers).


So that core developers can focus on writing C++ core. Just look at examples like tanker.nas, fox2.nas, [url]Curt's fully autonomous f14 demo[/url] or flug's bombable addon: They all use Durk's AI traffic system as their backbone and foundation, but they provide totally different and novel features on top of it.
In fact, there has so much more "AI" development taken place, just because the AI traffic system has become scriptable through the property tree.

Using Nasal, it would be possible to create AI traffic that responds to ATC instructions, and even ATC controllers that control simulated and AI traffic
So there's tons of flexibility here without C++ developers and their spare time being the bottleneck


— Hooray (Fri Feb 08). Re: AI-Scenarios.
(powered by Instant-Cquotes)
Cquote2.png

Scripted AI in FlightGear

Cquote1.png Another example is the "tanker.nas" script in $FG_ROOT which implements a simple scripted AI tanker for AAR purposes: search.php?st=0&sk=t&sd=d&sr=posts&keywords=tanker.nas

http://www.mail-archive.com/search?q=ta ... eforge.net

And then we have the fox2.nas script which implements a fox2 AI missile using Nasal: search.php?st=0&sk=t&sd=d&sr=posts&keywords=fox2.nas

The "bombable" addon is completely implemented in Nasal and created multiple virtual pilots for dogfighting purposes: Bombable

<iframe width="420" height="315" src="http://www.youtube.com/embed/LL7bdHrR8uI" frameborder="0" allowfullscreen=""></iframe>

Cquote2.png

Fully Automatized Missions

Cquote1.png Yes, it is possible "to make" such a mission - but you will literally have to MAKE it by writing a script to outline all required steps for your aircraft.

Curt did that a while back for the f14b, which did a fully automated carrier approach using just Nasal scripting:

http://diydrones.com/profiles/blogs/uas ... simulation
http://www.mail-archive.com/flightgear- ... 33987.html
http://www.flightgear.org/forums/viewto ... =4&t=13615

<iframe width="420" height="315" src="http://www.youtube.com/embed/cvbtSG9cy20" frameborder="0" allowfullscreen=""></iframe>

Cquote2.png