Genetic AI Project

Craterus22 said:
Any chance that you could combine the best 18-24 AI's of each generation into individual AIdata.txt files? (and perhaps leave them up for people to play against as humans? no need to record the data unless you want it - perhaps it would allow us to see progression over time)
Would be a good idea once save game compatability is working. Currently it's a bit unreasonable to expect anybody to play a game through without ever being able to load.

Melhisedek said:
Well... my MpLog is about 6,34 MBs of just "Rands" I mean every entry starts with Rand. Is that normal? In the case it is what rands would you like for me to upload? (Whole file zipped is about 1.6 MB so I could perhaps mail it to you)
It's probably not all rands, is it? It should be loggin player moves and suchlike. What I need are the last few player moves, and then the rest until the end.

Ta Teg. Didn't they win your last one as well?
 
Finally I finished my tests in AI3(first generation), the results are attached...

Im testing the AI27(0 views) now, but due lack of time and if somebody else(my gf plx) wants to use this pc I have to turn it off(bad pc) it will take about 1 week.
 

Attachments

Ta. As I said before - don't worry about being slow. All the data is useful, and if one data set gets done twice it's still not a problem.

Next generation will have some custom functions written by myself taking effect. There are currently 3 available, and each AI will have a 1 in 10 chance of having each of them in the next generation:

1) Promotions - this function means that the AI will only promote when either in danger, or if damaged when at war. This is instead of promoting as soon as it had the experience.

2) Danger check - now it checks against the fastest likely enemy unit rather then a blanket range of 4 tiles. The old method seemed pretty good so I'm not sure how much of an improvement this is. Also might have performance issues.

3) Safety check - like the danger check but checks to see if a plot is safe. Safe is defined as no non-friendly tiles within two turns attack range. If a city is deemed "safe" it should have a lower requirement for units to defend it making the AI's army more efficient.

If anybody has anything about the AI that they find poor, and would like me to patch something in for I'm happy to accept suggestions. The simpler the better (like the promotions thing).

Also, while I was about it, I spotted (and fixed) an AI cheat. When checking the danger range the AI would check for units in plots that it couldn't see. This has been fixed both in the original AI code and the altered danger range code.
 
Also, while I was about it, I spotted (and fixed) an AI cheat. When checking the danger range the AI would check for units in plots that it couldn't see. This has been fixed both in the original AI code and the altered danger range code.

Nice that you found this one and fixed it in your mod, but I would also report it in the bug reports forum. Perhaps there is a slight chance that it will be fixed in the vanilla version... ;)
 
Teg_Navanis said:
Nice that you found this one and fixed it in your mod, but I would also report it in the bug reports forum. Perhaps there is a slight chance that it will be fixed in the vanilla version... ;)
Good idea. I'll do that.
 
Wow, some of these AIs are really... crazy. I played a game on a tiny pangea, me and 4 AIs. One of them declared war on me sending a pathetic army into my territory which I killed easily and then sent my fairly good army onto their capital. Except their capital had a "bit" more than normal defense. After having killed 15-20 units I still couldn't see all their units. In fact by then the only units I could see when moving my mouse over the plot were catapults but I was attacking other types of units. I don't know how many units that were there, I quit trying to take the city and signed peace, but it may well have been enough to conquer my whole civilization. Once there's an AI like this who uses the units to attack with I might have to step down a difficulty or two ;)
 
snarko said:
Wow, some of these AIs are really... crazy. I played a game on a tiny pangea, me and 4 AIs. One of them declared war on me sending a pathetic army into my territory which I killed easily and then sent my fairly good army onto their capital. Except their capital had a "bit" more than normal defense. After having killed 15-20 units I still couldn't see all their units. In fact by then the only units I could see when moving my mouse over the plot were catapults but I was attacking other types of units. I don't know how many units that were there, I quit trying to take the city and signed peace, but it may well have been enough to conquer my whole civilization. Once there's an AI like this who uses the units to attack with I might have to step down a difficulty or two ;)

Lol I saw the same in 1 game, and the stupiest part is that every turn a unit was disbanded cuz lack of fund but every turn(or almost) the AI was re-building in the same city the unit lost or some other unit lol
 
Are there are settings you prefer us to use? I note most people are using 18 civs, but is that a good number to use? I was planning to randomise pretty much everything that can be randomised, then set the difficulty to Noble (the fair difficulty IIRC) assuming it isn't already forced, then just set it going.

Melhisedek said:
Cheers mate and welcome to Civ Fanatics!

Good to be here. I wrote about a system similar to this years ago, where every time a player played the AI the game would record the game, then send them to a central server for analysis. The server would use these results to generate new AIs and mail them out to game clients for (silent) testing. Thus would the AI get better without the involvement of the development team, but more importantly, the AI would remain relevant by adapating to the latest tactics.

I can't tell you how happy it makes me to see someone taking the first steps to making my dream come true.
 
Here is another data set; it is a first generation AI set.

I guess I left it running longer than i realized as some of these AIs have completed 25 matches! Once again, several (like 4 or 5) of the AIs came out above Firaxis AI with the top fitness ~ 3700 i think. Will download the latest version and the latest AI sets to start when i leave for work today.
 

Attachments

Quitch said:
Are there are settings you prefer us to use? I note most people are using 18 civs, but is that a good number to use? I was planning to randomise pretty much everything that can be randomised, then set the difficulty to Noble (the fair difficulty IIRC) assuming it isn't already forced, then just set it going.
I use Standard size, Shuffle, normal speed, and default world parameters. All the difficulty levels are adjusted to be the same as noble, so that's not a problem.

Basically, whatever you like. As in the first post I would suggest avoiding very small maps as a good AI will score very highly on them against a weak AI, skewing the results. While might be very good for separating fitness levels, the end result might be an AI optimesed for duel maps, which might not be so good.

I would also suggest you run the same settings for all of the AIs in each batch, just to keep each batch fair.


Don't worry about too many matches - it just means the data you have will be much more accurate.


I'll probably run the next generation tonight. Running out of sets in this generation.
 
The Great Apple said:
If anybody has anything about the AI that they find poor, and would like me to patch something in for I'm happy to accept suggestions. The simpler the better (like the promotions thing).

Not something the AI does poor but something that annoy me a bit. The AI is fine with doing nothing for hundreds of turns. If they've built everything they want and researched everything there is to research (future tech 20??) I'd like to see them go to war more often. Usually by then all the AIs left in the game are friends with eachother and noone does anything until finally someone wins by culture. Who will win is often obvious 3-400 turns before it actually happends. (I don't like time and space victories so those are both off in my games.)
 
The Great Apple said:
If anybody has anything about the AI that they find poor, and would like me to patch something in for I'm happy to accept suggestions. The simpler the better (like the promotions thing).

Man, the day that the AI really aims the Cultural victory I will give oyu a kiss, say you are the best, that the project is the best and I will dance for you!!Arabian dance!!111!!!!!123!!shift+1!! :king:
 
ToastyAlbus said:
Maybe I'm missing something - I've had this mod running for about 6 full games now (I think), and I'm not sure if it stops itself or if I'm responsible for doing so. When do(es) I(t) stop?

Thanks! Just want to make sure I'm helping!

I think he is hoping for 8 games for each AI in the pack... one of the problems that I had in the beginning was figuring out how to see when it was done... the pop up message that he has seems to only pop up when you start a game (right after assigning the AI's - meaning that you have to stop the game every now and then to see if the message comes up).
 
Craterus22 said:
I think he is hoping for 8 games for each AI in the pack... one of the problems that I had in the beginning was figuring out how to see when it was done... the pop up message that he has seems to only pop up when you start a game (right after assigning the AI's - meaning that you have to stop the game every now and then to see if the message comes up).
The popup should come up at the start of every game (even after restarts) after the set is complete. Does it not?

jpinard said:
Is there a way I can do this work... but also hafve another install of Civ IV + Warlords installed?
You should be able to have two copies of Civ installed at once.

This project loads as a mod - it doesn't effect the normal game files at all so you can easily switch it off any play normal games.
 
Back
Top Bottom