So, I made an AI for FA

Post here if you want to help developing something for FAF.

Re: So, I made an AI for FA

Postby Aulex » 26 May 2016, 05:07

Anihilnine wrote:I think you're being a little sensitive but whatever.

Machine learning is a cool idea.. Just analyze the replay vault.

But that to me sounds way too ambitious...


I'm not being too sensitive, it was just a stupid remark.

Well the concepts of machine learning aren't really ambitious, as it's just techniques built on-top of each other, so it's just a slow iterative process. The only real hindrance would be what's available for the AI to actually see as I stated previously. I don't think we could really analyze a replay file itself, rather we could just throw it up in ladder and have it learn there, providing both a "player" for others to play against and a way to train the AI. If someone wants to go this route I would love to help, I'm aware of a bunch of AI concepts, but not experienced enough to do this on my own.
"Let's start beating ass and die" - drunk TA4Life

"Just because you have a d*** doesn't mean you need to be one...pussy" -Blackdeath

SCOUTING SAVES LIVES
http://imgur.com/YGk0W0o

How to play Sup Com by Ubilaz
http://goo.gl/je83z
User avatar
Aulex
Contributor
 
Posts: 1050
Joined: 17 Nov 2012, 05:29
Has liked: 299 times
Been liked: 225 times
FAF User Name: VoR_Aulex

Re: So, I made an AI for FA

Postby ZLO_RD » 26 May 2016, 06:39

When AI will notice players players do certain things, it also need to see what triggers those behaviours, but just from replay it can't know unit position or health (you will have to run simulation) , and AI will need those to have any success, basic ability to retreat in front of a bigger army or kite or reduce unit production if all choke points have defence...

Sounds like you need AI with some advanced UI mods to help it do micro :D

Machine learning in FA sounds very complex to me.
Afaik machine learning AI with combination of stealing moves from best players, just managed to master GO and that was kinda big advancement.
http://www.youtube.com/user/dimatularus
http://www.twitch.tv/zlo_rd
TA4Life: "At the very least we are not slaves to the UI"
User avatar
ZLO_RD
Supreme Commander
 
Posts: 2265
Joined: 27 Oct 2011, 13:57
Location: Russia, Tula
Has liked: 303 times
Been liked: 400 times
FAF User Name: ZLO

Re: So, I made an AI for FA

Postby nine2 » 26 May 2016, 09:11

You can learn the entire replay vault.

1. branch fa lua code, including dump of critical information
2. run the replay with the branched code, dumping out info
3. automate downloading all replays, running them, collating info
4. run machine learning over all that and know how to be awesome
5. construct an AI to use that info and play against real people

1-3 are possible.
4 is interesting.
5 is too ambitious and would never happen.
nine2
Councillor - Promotion
 
Posts: 2416
Joined: 16 Apr 2013, 10:10
Has liked: 285 times
Been liked: 515 times
FAF User Name: Anihilnine

Re: So, I made an AI for FA

Postby zeroAPM » 26 May 2016, 09:48

So a AI that can learn from the player's actions?

Spoiler: show
Mantises hunt in packs, Commander
zeroAPM
Priest
 
Posts: 452
Joined: 21 May 2014, 20:39
Has liked: 3 times
Been liked: 52 times
FAF User Name: Impressingbutton

Re: So, I made an AI for FA

Postby Softly » 26 May 2016, 22:10

Hopefully some people will try running my AI, or browse the code a bit to see how it works.

Also can I recommend we start with some more realistic suggestions?
e.g. Could you teach this AI to make an air factory? (The answer is yes)

I'm open to contributing to some kind of standard machine learning API for the AI, but if you're going to make suggestions on this front then I'd ask you put some proper thought in first. Giving a list of "1) watch/play games 2) Do magic 3) iterate" won't get us any closer :)
Softly
Supreme Commander
 
Posts: 1009
Joined: 26 Feb 2012, 15:23
Location: United Kingdom
Has liked: 150 times
Been liked: 251 times
FAF User Name: Softles

Re: So, I made an AI for FA

Postby nine2 » 27 May 2016, 02:08

I can and will do 1,2,3 if someone can show me they can do 4 and 5
nine2
Councillor - Promotion
 
Posts: 2416
Joined: 16 Apr 2013, 10:10
Has liked: 285 times
Been liked: 515 times
FAF User Name: Anihilnine

Re: So, I made an AI for FA

Postby Softly » 27 May 2016, 02:12

Anihilnine wrote:I can and will do 1,2,3 if someone can show me they can do 4 and 5


4 and 5 are the magic bits though!
Softly
Supreme Commander
 
Posts: 1009
Joined: 26 Feb 2012, 15:23
Location: United Kingdom
Has liked: 150 times
Been liked: 251 times
FAF User Name: Softles

Re: So, I made an AI for FA

Postby Astrofoo » 27 May 2016, 04:08

More realistic suggestion: Teach the AI how to make and effectively use ghetto gunships. This is something that I would think would be a small challenge seeing as it wouldn't be "intuitive" for an AI.

Second Realistic Suggestion(Even "easier" one imo): Teach the AI how to use engies and engineering stations to assist factory production.

Also, I have put some thought into things the FA AI is already good at. Kind of a pros/cons list.

Things AI is good at:
AI is good at expanding; managing many bases at once; taking and controlling the map

Things AI is not so good at:
Micro in any form; skillful eco management; hard teching; using engies to assist factories


Play any match against the AI on a 20x20km map and you'll find that it expands a lot faster than you in every direction. It will most likely take early map control and hold it for a little while. That's because the AI is good at being at many places at once. This would require very high apm and concentration from any good player to replicate. Not to say you won't run it over in 10 minutes when you have 3x the eco and big tech advantage, but that's the point of this thread then isn't it?
"So now everything without a shield is gonna die, and everything with a shield is gonna die a little later." -TA4Life on the Mavor
User avatar
Astrofoo
Contributor
 
Posts: 190
Joined: 16 Jan 2013, 21:34
Location: USA
Has liked: 4 times
Been liked: 8 times
FAF User Name: Astrofoo911

Re: So, I made an AI for FA

Postby Sprouto » 27 May 2016, 22:16

Perhaps the most important thing for the AI is intelligence gathering.

All of it's decisions are based upon it's current assessment of threat. It has a VERY short memory, so very frequent intelligence gathering is an absolute must for the AI. Simply pushing units out onto the map is the reason why the K/D ratio of the AI is so incredibly poor. Without accurate and up-to-date threat values, the AI cannot make good choices about which targets to attack, and which to avoid, with any given platoon of units.

Understanding how the AI collects intelligence information, and how it uses it (ie. - the existing Threat Map) will allow you to bring a higher level of smarts to the AI.

For those that might be unaware, the Threat Map is simply a checkerboard (16 by 16 tiles) that is applied to EVERY map. As the AI sees units in each of those tiles, the threat value for that tile is adjusted. When the AI cannot see a tile, the threat level fades out fairly quickly (between 30-60 seconds). Most of the AI routines (both stock and Sorian) use this map to determine not only targets, but select movement paths, so you can see how vitally important it is.
Sprouto
Priest
 
Posts: 366
Joined: 08 Sep 2012, 05:40
Has liked: 54 times
Been liked: 74 times
FAF User Name: Sprouto

Re: So, I made an AI for FA

Postby Softly » 28 May 2016, 01:28

I've updated the code again to make the AI better, it can now consistently beat the Sorian AI on desert arena. This has been done while keeping the code really short and simple so people can pick up on it and understand it easily.

Next stop is to add some more sophisticated features, I'm planning on seeing how good I can get it at the desert arena map.
Softly
Supreme Commander
 
Posts: 1009
Joined: 26 Feb 2012, 15:23
Location: United Kingdom
Has liked: 150 times
Been liked: 251 times
FAF User Name: Softles

PreviousNext

Return to Contributors

Who is online

Users browsing this forum: No registered users and 1 guest