Genetic AI Project

Right. Next bug found. I've a feeling I may have been testing an old working version rather then the one I released, as I would have definately run into this bug.

Uploaded version 0.22. Sets the record for the most patches inside one hour. Sorry about this. You'll need this fix to actually use the thing at all, as it won't save correctly without it.
 
When are the results saved? Whenever a game ends? And how can I stop the automation mode?
 
Teg_Navanis said:
I'm intrigued :)

Your mod is running in the background, so please allow me to ask you a question: in what exactly are the different AIs different? I suppose it is mostly XML values, namely the AIWeights for different buildings/units, but is there also something else?
Nope. They're all AI personalitly values, and I've tried to leave them alone.

I've gone through the core AI making fudge factors variable. In other words, instead of valuing a point of food at, lets say, 5, it may value it at 6, or 4. This has been done all the way through the AI totalling about 1000 values (I'm a bit worried that may be too many)

In the future, probably for the next non-patch release I plan to implement a few new algorithms for the AI which will either be on or off.
 
Teg_Navanis said:
When are the results saved? Whenever a game ends? And how can I stop the automation mode?
Yes. Nothing is saved during the game. It also occurs to me that if you save, exit, and reload something bad may happen. It was something I didn't think to try.

CTRL-SHIFT-X again.
 
Well, I started a game with set 2 but stopped it because of the update to .22. It was pretty amusing though. I put it on auto and my AI built a warrior, a barracks, and then started on the Pyramids while the warrior was out exploring. Eventually some barbs just walked into the city and destroyed the civ...hopefully your algorithm sorts that AI out pretty quick :)
 
Yeah - there is a fairly rare mutation which causes the AI not to build any units. I'm not sure if it'll go with breeding or not. I've been trying to track it down for the last few days with no luck.
 
My first AI didn't build any settlers - one city challenge with standard settings so to say :)
 
I found that I got that in my current game (pangea), but in the previous it did seem to work (an islands game where it had no use for them). This is the version that you initially released with though.

I also noticed that the AI isn't doing any diplomacy (ie won't sign any open borders or anything, even when it would be of use). Is this a fixed bug?

Also I assume we just let the games run for awhile and then send you the ai file that we downloaded before?

Edit: Yeah, the same thing happened tome in my second game as what happened with Teg_Navanis.
 
I'm jealous. I've been trying for ages to reproduce that no unit gltich, and now everybody is getting it! I was getting it about once every 30 games.

I hadn't noticed any diplomacy issues. I'll look into it.
 
Right. I'm getting a whole host of errrors now. I was testing an old version, and it appears the changes I made to it while thinking I was testing them are quite quite buggy. Just found another one which prevents AIs from being loaded properly after saving.

Lets hope this is the last one. Will update shortly.

EDIT: OK, updated.

Two ways to deal with this when you hit it (if you have completed any games yet you will have).

1) Delete the file, start again
2) Go into AIData.txt, find the decimal number (should be near the left hand side - the 10th entry after the first square bracket on one of the AIs) and round it off to an integer.

Really sorry about this. I hope there aren't any more crippling ones.

EDIT 2: And if you managed to get the bug where the AI didn't build any units, and completed that game please upload the txt file here somewhere - I'd like to take a look at it.
 
Sorry, I was running that one when you uploaded the new mod, so I dumpted it.

On 2.2 is the "player's" AI different than the main AI/just in the learning stage because I've noticed that it's been doing some wierd things, witness this screenshot:

whatbx4.jpg


1. Why is it building a barracks first?
2. Graphical glitch: The hut does work, but doesn't "go away" graphically.
3. Why is it researching Animal Husbandry first of any other tech when there is nothing to use it on?
 
That looks like a graphics update problem with the hut. That happens. Not quite sure what you're highlighting with the tech.

The barracks looks like you have the no-unit bug again.

The player's AI is also not default, because most of the time the player won't be playing, so there is no point in wasting a slot with the default AI.
 
just started a game with 18 random players, on a huge map, all victories enabled, from the 'tectonics' script. its going about a turn every 20 seconds right now...

its gonna chug sooo bad in about 300 turns though.... anyways, im running on a amd 3500 venice.

irt civantares: animal husbandry: pigs? nearby cows?
 
The problem is that it refuses to build any settlers, all that it does is build wonders. It looks like this is the no units bug that you are looking for TGA, so I'll have it play through the night and send it to you tomarrow when it's done. :)
 
lost_civantares said:
1. Why is it building a barracks first?
I noticed twice that the AI was building a barracks quickly. My last game the build order was Obelisk(in the capital WTH?)/Barracks and then I quickly got destroyed by barbs after founding Buddhism and Hinduism.

**update** Well it looks like the default AI won for my first game.
 
Thanks very much. Hopefully I should be able to fix that one ASAP. I suspect it's one rouge variable which somehow disables unit construction, but I have to isolate it from all the other variables.
 
suspendinlight said:
I noticed twice that the AI was building a barracks quickly. My last game the build order was Obelisk(in the capital WTH?)/Barracks and then I quickly got destroyed by barbs after founding Buddhism and Hinduism.
It wasn't just "quickly", it was the first build! :confused:

It also seems quite wonder addicted, but I guess that's a side affect of building no units.
 
Fig said:
just started a game with 18 random players, on a huge map, all victories enabled, from the 'tectonics' script. its going about a turn every 20 seconds right now...

its gonna chug sooo bad in about 300 turns though.... anyways, im running on a amd 3500 venice.

irt civantares: animal husbandry: pigs? nearby cows?
TGA, are you performing some calculations between turns? They seem to be autoplaying rather slow and I've used the AI autoplay function before. Maybe the Warlords version is just faster.
 
Aaaah. Found it. I've found it!

*Jumps around in small circles*

It's all in the way that the AI decides upon the best unit. It does this by analysing all the units, and finding the best. It then goes through all the units again filtering out all units which weren't in the top third of the first selection, and does a few more things to make the unit production more diverse. My code was locking this second pass out in certain circumstances, and hence a unit was never found which was good enough.

Looking at it the genetics would solve this problem quite quickly - the lockout only occured if one number was greater then the other. Rather then changing the core code I'm going to scale up the default values so that the code is still genetically altered. I'll put in a safety catch to stop it from doing this again.

Poring through 10's of thousands of lines of code I'm bound to make a slip up like this occasionally. I hope there aren't more, but I'll do a breif search for similar functions on buildings.
 
Back
Top Bottom