Page 1 of 1
Generalized AI
Posted: Sun Oct 21, 2012 2:52 pm
by vrkomarov
Hi everyone. I'm trying to make an AI that will work with all modes. Currently have a working implementation, that works with ra, cnc and d2k mods. Tests were carried out mainly on the cnc mod so it works best in it.
In ra mod are problems in the operation of aircraft units and ships (mainly because I almost did not work with ra mod). Now I'm looking for the best way to fix it. Also plans to make ai more strategic.
While the principles of all mods are almost the same, make a fully general controller for all mods are unlikely to succeed (for example, because a support power works everywhere in different ways etc). So in the future I think it is reasonable to make a general class for all mods and in each of them, only override additional functionality.
Here I propose to discuss the ideas and choose the best way for a good AI architecture.
My repository here
https://github.com/VrKomarov/OpenRA
Posted: Sun Oct 21, 2012 3:27 pm
by zypres1
Wow. Things are happening with AI. Sweet.
All the AI devs should team up, this way we do not end up with only one dev, and we have a finished product, not just new AI development all the time.
Have you spoken with Valkyrie? Could you team up? What are your differences than his code?
Thank you for making AI, I hope you can get all the help you need on IRC..
Posted: Sun Oct 21, 2012 4:15 pm
by vrkomarov
No while i don't speaking with Valkyrie. His code is strongly tied to RA mod. I'm trying to write a generic code. At least at this stage. In the future will still have to do some things more specifically. Plus I use a finite state machine for the squads of units and fuzzy logic in some cases.
Posted: Sat Nov 17, 2012 6:48 pm
by Matt
vrkomarov wrote: ↑No while i don't speaking with Valkyrie. His code is strongly tied to RA mod. I'm trying to write a generic code. At least at this stage. In the future will still have to do some things more specifically. Plus I use a finite state machine for the squads of units and fuzzy logic in some cases.
Your general approach to unit handling is a big plus (Valkyries code crashes with d2k and cnc) and it is very resource friendly. I tried 8 bots fighting each other in d2k which is very spammy, but your AI is using the path finder more seldom which removes the CPU lag spikes. It is also very robust. I experienced no crashes. One thing: you added a binary
https://github.com/VrKomarov/OpenRA/blo ... ibrary.dll Where does it come from and is it also Open Source?
Posted: Mon Nov 19, 2012 10:48 am
by vrkomarov
Thanks for the nice review. Yes FuzzyLogicLibrary.dll is open source (GPLv2). I took it from here
http://sourceforge.net/projects/fuzzynet/
Posted: Mon Nov 19, 2012 11:03 am
by Matt
Posted: Mon Nov 19, 2012 11:36 pm
by chrisf
We'll need to clarify with the fuzzynet author whether their licensing terms are GPL2 only, or GPL2+. We've got a problem combining it with openra if it's 2 only, since we're 3+.
Posted: Tue Nov 20, 2012 4:25 pm
by vrkomarov
chrisf wrote: ↑We'll need to clarify with the fuzzynet author whether their licensing terms are GPL2 only, or GPL2+. We've got a problem combining it with openra if it's 2 only, since we're 3+.
I will try to contact with the fuzzynet author.
Posted: Wed Nov 21, 2012 12:26 pm
by vrkomarov
Author said that on his part there are no restrictions and library can be used under any license.
Posted: Wed Nov 21, 2012 4:47 pm
by zypres1
Sweet. Thank you vrkomarov and Mailander...
Please also explane how the AI works, what is different from earlier hackAI, betaAI and simmilar?
Posted: Wed Nov 21, 2012 7:01 pm
by Matt
This fuzzy logic thing makes it quite easily readable:
https://github.com/VrKomarov/OpenRA/tre ... Mods.RA/AI
As far as I understand and observed it: the decision when to attack is more dynamic. If the enemy is on low health: get 'em no matter what. If you have a lot units in your base: throw them at the enemy, but if you own health is low: retreat the units (it will however not repair them).
Posted: Wed Nov 21, 2012 10:57 pm
by vrkomarov
I'm a little fix logic for air units in RA mod. Helicopters work fine (so far), but the planes returned to base badly. Problem in the choice of landing sites.