InAI - custom AI interface
(11 posts, started )
#1 - Vain
InAI - custom AI interface
Hello!

I always had interest in creating AIs and created AI-models and sourcecode for AIs every once in a while. I'm sure there are more people who have common interests. In the old days of Counterstrike the NN-bot, f.e., came up as part of a school-work about artificial intelligence.
With that amount of creativity lying around it would be nice to open LFS for custom AI development. I imagin a system close to OutGauge, with bidirectional data-transfer, that would allow the AI-developers to retrieve information about specific cars and to send back the steering input of the AI cars.

LFS is an online simulator and I don't believe that a lot of Scawen's time should be spend on the AI because of it's limited use. On the other hand there are developers that enjoy toying around with AIs and would enjoy contributing to LFS with their knowledge.

Vain
No dont do it! I've too many other projects this will just distract me !
Do you mean as in a way to control AI? i.e. by modifying virtual axis input? That would be quite cool. Although I fear it would force me to make it work for my own car and then I could have my own LFS-version of Kitt...

Very cool idea, although is it really worth the time for Scawen to develop and document another interface?
#4 - Vain
Yes, that was pretty much how I imagined it.
You send LFS a InAI packet that registers an Ai car to you. From then on you will recieve 3 packets a second about the status of that car (and all other cars you registered) on a specific port. Fuel, position, speed, steering, g-meter, tyre-usage - all relevant simulation data. Then you feed this data into your magic black-box-AI and put the output of your AI-wizzardry into a new packet that contains steering and gas and send this data back to LFS on the same port to control your AI car.

Scawen has written InSim and OutGauge. The development of OutGauge was extremely short (just a few days, if I remember the timeframe from the idea in the forum to the release of OutGause correctly). InAI is a very similar system. Even if it takes three times the development-time of OutGauge it'll still safe him months of Ai development.

Vain
Sounds like a good idea
#6 - X-Ter
If such a project flies, please make it in a way so the AI is "user editable", like for example for Nascar Heat.
Instead of auto-upgrading, AIs should have attributes like players in FIFA I.E. Bravery, aggression, starts, tactics, setup, concentration etc. etc.

I hope the AIs should make mistakes occasionally. When was the last time a TRD3 AI span or caused a yellow flag?
-
(thisnameistaken) DELETED by thisnameistaken
My issue now is that 1/3 of a second isnt a high enough resolution to get this sort of thing to work, surely?

Say an AI is controlling a vehicle at 200MPH. At that speed the car is running at about 89.4 metres per second (my math, incase anyone wants to find fault: 1/3 * (200 * (1 609.344 / 3600))). A 3rd of that distance is 29.8 metres. Thats a bit of a critical distance for input..

What we know is that the LFS physics loop runs at 100Hz, with a 20Hz inner loop. This can lead us to deduce that the "native AI" has a much more granular control than your currently proposed system would.
#9 - Vain
I took those 1/3 of a second as an example. You can increase that by a lot because we're connected to localhost and bandwith and latency are of no issue. The current AI runs at a sample rate that is quite near to those 0.33 seconds. If you view an AI from cockpit you can see that it changes input only a few times a second. I also read that the AI begins to jitter around it's desired line in the BF1 because it can't react fast enough because of the big traveled distance between every refresh, as you said. Also out multiplayer-games are refreshed at a similar rate. That means it should definitely be bearable.
A handy solution would be to have the frequency controleable when you register your Ai-car. That way the AI developers can toy with that value and use just as many cycles per second (and thus cpu-time) as required (this would certainly differ between UF1 and BF1 ).

I don't know wether a lenghty discussion of the details is useful at this time. If Scawen likes the idea and puts it on his to-do-list for Patch V he will decide the parameters of this interface by himself.

Vain
Quote from Vain :Also out multiplayer-games are refreshed at a similar rate. That means it should definitely be bearable.

The client interpolates the multiplayer packets. I suppose you could technically run a similar system on the AI, and may even do so already. Despite this on most multiplayer servers you still get an input rate of 1/4 or even 1/6 of a second.

I'm all for this idea though, if the out going packet speed could be regulated
#11 - Woz
there is a race game/sim that I found a while back but can't remember its name that was an AI race where the sim provided an interface that you could use to control the AI drive through source code.

The idea was that comps would be held to find the best AI driver.

Similar would be great for LFS

InAI - custom AI interface
(11 posts, started )
FGED GREDG RDFGDR GSFDG