Author Topic: Mutant AI  (Read 17358 times)

0 Members and 1 Guest are viewing this topic.

Lost Seedling

  • Shrub
  • ***
  • Thank You
  • -Given: 22
  • -Receive: 25
  • Posts: 195
Mutant AI
« on: September 19, 2012, 08:29:03 PM »


A disease has ravaged the Seedling Universe for too long, and like a cell that develops a resistance to an invading bacteria, so a Mutation has occurred that will help the Seedlings fight this scourge of the Seedling Universe. (In the photo above, you can see the Mutants being injected into a Seedling cell wall to fight the invading pathogen!).

Take a dose of the "Mutants" today!

Note:

The MutantAI is not a playable map. While the MutantAI can be assigned to a specific Faction, it's original purpose was as a part of the AI Assist (see separate post), and normally plays as the player's Faction. If you wish to play against the Mutant AI or assign it to another Faction, some slight alterations in code will be necessary.



Lost Seedling

  • Shrub
  • ***
  • Thank You
  • -Given: 22
  • -Receive: 25
  • Posts: 195
Re: Mutant AI
« Reply #1 on: September 19, 2012, 09:02:31 PM »
Watching the existing AI's in action, I noticed certain behaviors that I took advantage of in order to defeat them. I wondered if it would be possible to create an AI that would exploit those weaknesses well enough to actually win once in a while. This was the result. I've found it capable of competing with Infected and Merchant under certain conditions.

I have to say, after working on this, I am totally in awe of Annikk's original Infected AI which is genius in it's simplicity and deadly relentlessness. I'm glad I had both it and Merchant to watch and learn from., as well as mihhaelo's unfinished effort (though I will admit I have no idea what Merchant does despite trying to figure out Aino's code. Thank you Annikk for putting comments in your code!).  I'm embarassed to even call this an "AI", but it is what it is and does provide me some entertainment in watching it do what it does, however awkwardly.

If I had more time to run simulations, I see vast areas for improvement (keeping the framerate as high as possible, of course). It's funny how just the slightest tweaks can make a world of difference in the results. I also have several ideas for a much simpler approach to an AI, that may actually be flexible and competitive. Maybe someday if the new Eufloria PC version is moddable, I will tackle that project.

« Last Edit: September 20, 2012, 12:17:19 PM by Lost Seedling »

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 4
  • -Receive: 27
  • Posts: 1,523
  • They'll eat you next!
  • Eufloria: Yes
Re: Mutant AI
« Reply #2 on: September 20, 2012, 12:24:46 AM »
How to encrypt a code: no comments :P
Sorry about that, and my AI works in a very similar fashion to Annikks, only it scouts asteroids(unlike Infected) before doing anything to it, that is why the priority is a matrix instead of an array :)
Mine saves the neighbour asteroids as a variable, keeping FPS very high, but it doesn't support gravity mods or moving asteroids.

Also, gratz on your first AI, I guess it's your last too? :P

Lost Seedling

  • Shrub
  • ***
  • Thank You
  • -Given: 22
  • -Receive: 25
  • Posts: 195
Re: Mutant AI
« Reply #3 on: September 20, 2012, 04:18:24 AM »
Well some of the wildest and wooliest battles I've seen have been between Mutant and Merchant. It gets quite exciting at times! Sometimes, if I could reach into the computer, I felt like taking a hammer to Merchant because it was so IRRITATING! Like a gnat that keeps flying at your face, it is constantly harassing.

I have to say that if Annikk made just a few slight changes to weaknesses in Infected that Mutant tries to exploit, and given the limitations in game frame-rate, Infected would be nearly impossible to beat in larger maps, by man or machine. But, that is the problem of of being on the frontier, you don't have the advantages of those who come behind you.

I should also say that "beating" is not an appropriate description in any AI "battle" where one AI has the advantage of seeing how the other operates beforehand. But these AI arenas do make interesting exercises in logic and decision-making, as well as efficiency in the use of precious clock-cycles! I just hope Annikk doesn't update his beast anytime in the near future, although a reduction in performance drag would be nice! :)

Quote
I guess it's your last too?

I hope not, but I just may not have time in the future. While making this, I learned quite a bit about trying to optimize decision-making and simplifying as much as possible versus the need to cover more and more options and possibilities. I initially was going to pursue Annikk's basic idea of assigning values to Asteroids until I looked at his code and saw he had already done that, so rather than just try to make an improved variation of that method, I tried the method that ultimately became the Mutant. Anyway, while working on this, I came up with several other ideas that I think could be devastatingly efficient, so maybe if I have time in the future I'll pursue those. I think, though, if I have any time for more Eufloria, I will try to build a proper AI contest map in which each AI has exactly the same chance at victory. (Except for the "bias" of the asteroid numbering system, which gives a slight bias to lower-numbered asteroids thanks to the for-loops in the lua code).

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 4
  • -Receive: 27
  • Posts: 1,523
  • They'll eat you next!
  • Eufloria: Yes
Re: Mutant AI
« Reply #4 on: September 20, 2012, 05:00:45 AM »
Well some of the wildest and wooliest battles I've seen have been between Mutant and Merchant. It gets quite exciting at times! Sometimes, if I could reach into the computer, I felt like taking a hammer to Merchant because it was so IRRITATING! Like a gnat that keeps flying at your face, it is constantly harassing.

I have to say that if Annikk made just a few slight changes to weaknesses in Infected that Mutant tries to exploit, and given the limitations in game frame-rate, Infected would be nearly impossible to beat in larger maps, by man or machine. But, that is the problem of of being on the frontier, you don't have the advantages of those who come behind you.

I should also say that "beating" is not an appropriate description in any AI "battle" where one AI has the advantage of seeing how the other operates beforehand. But these AI arenas do make interesting exercises in logic and decision-making, as well as efficiency in the use of precious clock-cycles! I just hope Annikk doesn't update his beast anytime in the near future, although a reduction in performance drag would be nice! :)



I hope not, but I just may not have time in the future. While making this, I learned quite a bit about trying to optimize decision-making and simplifying as much as possible versus the need to cover more and more options and possibilities. I initially was going to pursue Annikk's basic idea of assigning values to Asteroids until I looked at his code and saw he had already done that, so rather than just try to make an improved variation of that method, I tried the method that ultimately became the Mutant. Anyway, while working on this, I came up with several other ideas that I think could be devastatingly efficient, so maybe if I have time in the future I'll pursue those. I think, though, if I have any time for more Eufloria, I will try to build a proper AI contest map in which each AI has exactly the same chance at victory. (Except for the "bias" of the asteroid numbering system, which gives a slight bias to lower-numbered asteroids thanks to the for-loops in the lua code).

Nice to hear that it might not be your last AI, and that you've learned quite a bit from this. Though if you have any problems, just ask anyone of us(I know you wanted to keep this secret though)...

And honestly: I think that if Annikk removed the clairvoyance for his AI, Merchant would beat it... But I'd rather him not removing that, 'cause I want to make an AI that beats it! :D

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 4
  • -Receive: 21
  • Posts: 929
  • Eufloria: Yes
Re: Mutant AI
« Reply #5 on: September 20, 2012, 05:33:57 AM »
If he removed the clairvoyance from his AI, it would be crippled. IIRC, he said that it relies on that ability to function correctly.

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 4
  • -Receive: 27
  • Posts: 1,523
  • They'll eat you next!
  • Eufloria: Yes
Re: Mutant AI
« Reply #6 on: September 20, 2012, 06:23:31 AM »
If he removed the clairvoyance from his AI, it would be crippled. IIRC, he said that it relies on that ability to function correctly.

Yes, the arrayed Matric, or Priority as I call it, depends on that. This is the main reason why mine has a matrix and not an array :)
 - But I was speaking of the AI's tactics and workarounds in the world. I guess they'd be outmatched by the Merchant AI. I don't know though, not until the clairvoyance is actually removed(if ever it will be).
« Last Edit: September 20, 2012, 01:54:18 PM by Aino »

Lost Seedling

  • Shrub
  • ***
  • Thank You
  • -Given: 22
  • -Receive: 25
  • Posts: 195
Re: Mutant AI
« Reply #7 on: September 20, 2012, 09:45:24 AM »
Clairvoyance? I assume you're referring to the AI surveying asteroids that are not yet "discovered" by the AI, and therefor "cheating", as is implied by the criticism. I think Annikk said that he just wanted to give the AI any advantage possible regardless of the limitations of it's human opponent. I agreed with Annikk's reasoning, since the ultimate goal is making the game experience more rewarding for the user. not a test of replicating human thinking by the AI.

In my experience, it was very hard to avoid that tendency to gather more information than would be considered "fair". Instead of sending out exploratory seedlings to "reveal" the neighbors as Merchant seems to, I opted to compromise and directly examine the neighbor asteroids and not ones "out of range", but without sending out the seedlings. It appeared to me that one could make a verrrry smart AI by sampling the entire asteroid field. There are critical moments of weakness by each Faction during the game that one could easily exploit if one had the information. iOf course, more information may require more decision-tree operations, so the cost/reward ratio may not be profitable. That certainly is one of the avenues for a future AI I'd like to explore some time. But I tried very hard to keep the logic within the confines of what information was "officially" available, but in most cases would be too hard to gather and process by a human player in time to make use of it.

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 4
  • -Receive: 21
  • Posts: 929
  • Eufloria: Yes
Re: Mutant AI
« Reply #8 on: September 20, 2012, 06:32:19 PM »
Oh, I wasn't criticising any of them. I just remember reading somewhere that IAI had no way of exploring.