I have been playing with this game and lurking in this forum for a while now.I very much like that while the premises are simple, this game can get very complex very fast.

I was wondering if the desktop version comes with an api or what would be the best way to interface this with a genetic learning neural network? So we could have an AI making AIs.This would not go online, the AI would play against other "species" of itself.

Ideally the AI could access the menu by an API an accelerate matches to get results. I am curious how long it would take and what AI could be generated.Of course the project would be open source, if authorized by @GFX47

Please note, I am not a machine learning expert. Just some junior javascript dev

Any information welcome, I am not even sure what language this game is in!

I've wanted to do the same thing too! I think it would be a huge amount of effort for the developer to publish some API that can interface with the game to do what you want.

You could always load games and intercept the traffic with Fiddler or something. You get a bunch of hex numbers which I assume is information about the map and the AI instructions for each bot. I doubt you could decode it, but you might be able to introduce random mutations and see if you could improve it over a long amount of time. But without being able to decode the information, you wouldn't know why your bots are doing what they are doing. =~)

It is not possible to really get any information out of the game unless you somehow manually have a way to detect what is going on on-screen. Otherwise, you are better off creating your own simulation outside of the game

Kanishka it depends how you make the neural network. Surely given the amount of possibilities, unless one goes hardcoding solutions a neural network made by a single person may reach 1200. It is not that everyone is as good as the alpha go team.

That seems weird... Do you know what parameters where used as weight? I would guess winning the game, in the smallest amount of time, with the most bots still alive, in that order.

It is not necessary to know/see what the bots are doing during a match. Only to be able to modify the ais, send them to war, then get results (won/lost, number of bots alive on win, time elapsed, score).

The algorithm would then select the best ais using those criteria, and have them breed (yes, robots breeding), which may or may not produce better ais. Rinse and repeat until able to beat Kanishka/Computer dies

I would say no. While the project is nice, once it is done (and maybe open sourced ) then you have similar problems like lichess. Players playing with heuristic engines rather than themselves . One wouldn't know about cheaters and the game at the upper end will die.

Why should I spend time when an heuristic engine can develop a tactic like mine on a couple of hours ?Why should I play when the next player may just brag his strength but he is using an engine ?

If one wants to develop an heuristic for the game one can replicate the game (in a simplified fashion) and then let an heuristic play in the replica not in this game.

It would be exactly the same result but without.consequences for the playerbase. The rest is , for me, only a whish to show off while using machine learning frameworks that do all the real work.

mhhhh i have played with neural nets before, and that was one of my first thought when i saw this game.Based on my experience i see two different approaches: bruteforce the game through neuroevolution, or use reinforcement learning.

Neuroevolution would be the easiest approach, you don't even have to look at the games, you just create thousands of random ai, let them battle, assign a score to each one, higher score means higher chance of reproduction through the next generation, create next generation, keep going on till you're satisfied. The Problem is the depth of the game, think about how many combination of filters you can use on a single action, and how many conditions (with their own filters) you can apply to the single action. Add branches and logic gates and the combinations skyrocket to billions, bruteforcing billions of combinations can be quite timeconsuming.

Using reinforcement learning can be quite tricky, since we don't have control of the ai during the match. The typical Markov chain is basically a circle between the agent and the environment: agent looks at the env state > agent predicts result of future actions > agent does something > agent receives new state and "reward" score from env > agent compares reward with prediction > agent looks at the new state > repeat. Since you do not make choices during the game, the net should be able to analyze the entire match afterward, and it has to look both at the game and at the decision tree to be able to understand relations between coded actions to the actual actions on the screen.