Status of AI in FlightGear

From FlightGear wiki
Revision as of 09:29, 26 June 2014 by Hooray (talk | contribs)
Jump to navigation Jump to search

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)
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)

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 ...

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="" frameborder="0" allowfullscreen=""></iframe>


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: ... simulation ... 33987.html ... =4&t=13615

<iframe width="420" height="315" src="" frameborder="0" allowfullscreen=""></iframe>