Learning AI- An idea for Dark Avatar/ GalCiv3

I have an idea to improve the AI in the next version of GalCiv, so that no-one can complain that the AI is easy. I know this may seem like a tall order, but here goes- make the AI learn from the player. I know that the AI is programmed to use weapons and defenses that work best against your ships, but wouldn't it be great if they analyzed your whole style of play, and adapted their styles to counter yours? Or if the AI learnt from you, and if you find a great play method that allows you to win, they will adapt and use that themselves? Or better yet, if the game would analyze your play, and your scores from past games, and level the AI to your level, so you would be playing against an opponent with similar skills to yours- it would be challenging, but possible to win. I don't know if Stardock has time to implement these ideas, but it would be excellent if they did. Any comments/flames, etc?
8,893 views 16 replies
Reply #1 Top
The AI already 'learns' during teh course of the game from it's own actions, repeating things with good results and avoiding things with bad results. The problem is that it doesn't save it's knowledge from game to game.
Reply #2 Top
Thus the saying,"Never the same universe twice" If an AI learns something in 2226 A.D, why would it remember it in 2225?
Reply #3 Top
The AI already 'learns' during teh course of the game from it's own actions, repeating things with good results and avoiding things with bad results.


Does it? I hadn't noticed! LOL!

Anyway, adaptive AI would be great, but I would imagine one hell of a programming task.
Reply #4 Top
Does it? I hadn't noticed! LOL!


Well, it's supposed to
Reply #5 Top
Does it? I hadn't noticed! LOL!


If it's doing the job right you shouldn't notice, you notice when the AI gets it wrong, not so much when it gets it right.
Reply #6 Top
This would be cool as an additional AI setting apart from the regular difficulty settings. I think that the regular AI should work similarily to the current model, but there should also be an optional learning AI that would compile a database of what it learns from game to game. It might learn the wrong things from the player, but on the other hand that might be counter balanced by what it learns from itself -- that is: other AI civs in the game.
Reply #7 Top
Here what someone wrote about AIs which would seem to relate to the AI learning problem:
" One well known problem for AI is the "frame problem". It is known that humans, when faced with a particular problem to solve, somehow manage to consdier only a relevant subset of all the information stored in memory; thereby weeding out a vast store of irrelevant information. All efforts to duplicate this process with AI have, to date, failed."

So as humans every time we play a game of Galciv2 can easily narrow down where we went wrong and how we can improve our next game. An "learning" AI has to somehow take all the numbers (data) and showhow make sense of it.

If Brad was that good at programming AI he probably wouldn't be making games but working for the government making high tech weapons.
Reply #8 Top
Maybe make it an option where the AI remembers things from previous games?

Reply #10 Top
Hit the power button on your computer, jalex.   
Reply #11 Top
Haha interesting questin and not all atempts at recreating this process failed. Some dude i think in England found a way to randomly wire chips that could produce a processing level that a normal human working for his whole life couldnt.
Reply #12 Top
I don't no much about AI but I think one problem with learning AI is that they just have to try random stuff. if it brings them closer to their goal then they repeate it (kind of like evolution I guess). However if it couldn't learn fast enough it might just do stupid stuff in the beginning and by the time it became mediocre the game would already be over. plus what if it learnd something stupid and just suicided it's self
Reply #13 Top
Mirror, the AI type you're thinking of (learning in a game) is already implemented. And it knows what to do from it's algorithms, it just decides which are best.

What's being asked for here is a neural net that learns in-between games, specialising in beating that individual player in particular. This has been asked for once or twice before (quite a while back) and I think the answer was that it couldn't realisticly be done without scrapping the AI.
Reply #14 Top
TheGreatEmperor: What the guy in England actually did was create a computer system that could design and manufacture processorsthat continually improved and evolved, and were far superior to man-made versions. And I know that it would be a huge task to program the AI to this level, that's why I said it could be for GC3, as by then the technology to make AI that advanced could already of been implemented, but the other idea I had of making the AI intelligence scale to you could be done, it was in Unreal Tournament I think (can't remember which one, though).
Reply #15 Top
" One well known problem for AI is the "frame problem". It is known that humans, when faced with a particular problem to solve, somehow manage to consdier only a relevant subset of all the information stored in memory; thereby weeding out a vast store of irrelevant information. All efforts to duplicate this process with AI have, to date, failed."


The 'frame problem' is actually of greater relevance if you are trying to design an all purpose *general* AI like one that can pass the Turing's test.

For 'simple' restricted domain specific tasks like learning for a specific game where the rules are specified in advance, learning is far easier.
Reply #16 Top
I agree the "frame problem" wouldn't be as big for a game like GalCiv2 than a robot but is relevant as it still would be a huge task. Anyone who play PC chess still see the AI has the "frame problem" but not as important in making a strong Chess AI because of the limited number of moves possible in each turn. Thus a AI simple searches almost every possible moves in as many plies it has time for. Since CPU has gotten a lot faster it takes no time for Chess AI to look at all possible moves in 8-10 moves ahead.