A Better AI.

Id usually reload but it would go OOS within 2 turns or so. We would usually start again. no, im not using smart map just regular warlords with betterai. I dont know if it even the betterai causing it directly or indirectly. Just raw 2.08 warlords it might go OOS very rarely but its been much more requent since the 12/21 build, but it appears very random cause some games it goes great with no OOS but once one shows up its seems to keep coming back again

Thanks for the feedback.

Maybe blake can take a look at things or if someone could give me an idea of how to better debug this. We have been playing quite a few lan games over the weekend. There is usually 3 of us playing over a lan so i would be happy to try any fixes or debugging that would be needed.

Great work so far!
 
Can't wait to try this again - the new build sounds great - haven't had time for single player in a while... but my wife is going away for a month on business in another week and a half. Some time just might open up at that point... ;)
 
I have noticed that my game seems a little more crash-prone toward the end,

Yeah, once the AI turns start to be long for me this occasionally happens. It happens more-so in multiplayer games, but I've now had it happen a few time even in single-player. It just seems like sometimes the AI just 'sticks' when its in those long delays and then *poof* the game goes OOS.
 
- AIs should be a bit more aggressive when they just got their unique unit. It's often a good time to attack.

I can see the merit in this idea when you're thinking about praetorians, but there are other unique units that are not so great (fast worker was a good one :D ). Thus this means that any emphasizing on aggression when a unique unit is available should be considered in a careful balanced way. Now the stock 2.08 warlords game and the 1.61 vanilla game already encourage war for those leaders who get strong unique units.

The AI leaders base their war declarations mainly on their military strength compared to the military strength of their opponent. The military strength of a nation is calculated using a complex formula and within this formula the value of for instance praetorians is higher than the value of normal swordsmen. This means that the military strength of the Romans is going to become bigger than the military strength of a neighbouring country which is building swordsmen and thus a war declaration becomes more likely.

You can find the military strength formula in this article (section demographics screen, soldiers). Note that the article was recently updated (for warlords 2.08) and this update was not performed on the war academy version of the article.

If the AI should declare war sooner when a unique unit is available, then I suggest changing the military strength value (soldiers value) of the various unique units.
 
Yeah, once the AI turns start to be long for me this occasionally happens. It happens more-so in multiplayer games, but I've now had it happen a few time even in single-player. It just seems like sometimes the AI just 'sticks' when its in those long delays and then *poof* the game goes OOS.

You know -- I noticed that it was especially prone to crash during unit actions -- such as when I ordered a stack of units to GOTO a certain location (usually a city that already had a stack of units, as a build-up to a war.) It also crashed during a frigate bombardment of a coastal city -- unit animations. It happened repeatedly -- i.e., game crashed, I reloaded to the nearest save game point, found myself in more or less the same situation, tried to do the same action, and it crashed again. For the GOTO crash, I ordered the stack to a square adjacent to the city then moved the units in manually. For the bombardment, I just tried it again and it didn't crash.


One other comment -- I played another game (techtonic, small, Bismarck/Germans). It looked like Mansa was going for a culture win, so I geared up the Panzers to take him down. What was funny was that although Mansa was (as usual) a financial/tech leader, and although he had Assembly Line, he only had a couple of Infantry in each city. The rest were longbowmen. He had a mess of them in each city....not enough against my blitzkrieg, naturally, but it seemed a bit odd that he didn't devote the cash to upgrading.

I went on for the domination win, so I think I'm starting to get my "noble" legs. I'll try a culture win next, and if that works, I think it's time to move up(!) to Prince level.
 
Traditionally (well within the short tradition of this project) we do release a bugfix build a few days after each main build.

Blake could you please check-in the fixed source codes to sourceforge? I just can't wait anymore , i will just build it myself and play :)

(i feel like eric cartman hyping for nintendo wii...:))
 
I think the build governor is in general working very well. It's so far beyond the original version that it's like governor "3.0."

However, selecting multiple emphasis options doesn't always produce sensible results. If, for example, I select beakers and hammers, I'd like it to produce more hammers than if I select beakers alone, and more beakers than if I select hammers alone. (Hopefully you didn't have to re-read that too many times.) I think that at the moment this isn't working correctly.

It shouldn't be that hard to figure out what the governor should try to accomplish. Again, if it's "beakers and hammers," the govenor could figure out the beakers from the beakers setting alone, the hammers from hammers alone, and then aim for a value between those. I haven't looked at that code so I don't know whether that would involve writing a middle layer of logic to compute a target output and try to match that rather than just "as much of this as possible," "as much of that," and so on. Sounds like it would be fun to write though.

Also, I wonder, is there a way to get more functionality out of the user interface while maintaining the "no changes to UI or save compatibility" rule. For example, if you have "emphasize GP" selected, could it do something intelligent like:

1) If you have any yellow-boxed specialists, only create more specialists of that type (avoid contamination)

2) If you have no yellow-boxed specialists, and there are GP points from wonders etc., only create specialists of that type/those types (again, avoid contamination) - if that doesn't satisfy the user's desire (because there aren't enough buildings to allow maxed-out GP production) then the user can tweak it manually

3) Otherwise, just generate as many GP points as possible, using the types of specialists that maximize the bonuses from those specialists

Rule 1) would do a pretty good job of implementing the missing "emphasize culture" feature I think. Just yellow-box an artist and hit the GP button.
 
Ideas :

- AIs should be a bit more aggressive when they just got their unique unit. It's often a good time to attack.

No offense, but it's not a good idea to write knowledge of that directly into the code. Unique units vary widely, and what's special about them can be expressed entirely in terms of things the AI already needs to know about: strength, first strikes, etc. Rather than coming up with a special case for unique units, it would be a lot better to just come up with better algorithms for evaluating relative actual and potential military strength between civilizations. This also makes the AI more generalizable to variants where there are no unique units, or multiple unique units, or something else. What matters is what strength potential opponents have and what strength they could achieve in the relative short term, whether it's through unique units or otherwise.
 
I agree but there were 2 advantages I see :

- usually, your UU has no equivalent at the same tech level, that's why it's generally a good idea to use it for offense, you're not likely to meet equivalent units elsewhere at the same tech level. My idea there is always the same : make the AI use its strength, so being aggressive if this is his trait, spamming cottages if they are financial, generating great people if they're philosophical, building more wonders if they're industrious and use its unique unit to attack too... exactly like the good human players do.

- you would see the civs trying to improve during the period when they were really historically dominant, which is fun and historically accurate :)
 
Yeah, once the AI turns start to be long for me this occasionally happens. It happens more-so in multiplayer games, but I've now had it happen a few time even in single-player. It just seems like sometimes the AI just 'sticks' when its in those long delays and then *poof* the game goes OOS.

If you have a save game which has a reproducable crash or hang (either in loading the save, or in performing some action, or ending turn), please post the save.

I would encourage everyone testing BetterAI to change their ini file to save every turn, and increase the total number of saves to at least 30. This way, you can go back several turns, if necessary, to find the trouble spot.

Thanks,

-Iustus
 
I agree but there were 2 advantages I see :

- usually, your UU has no equivalent at the same tech level, that's why it's generally a good idea to use it for offense, you're not likely to meet equivalent units elsewhere at the same tech level. My idea there is always the same : make the AI use its strength, so being aggressive if this is his trait, spamming cottages if they are financial, generating great people if they're philosophical, building more wonders if they're industrious and use its unique unit to attack too... exactly like the good human players do.

- you would see the civs trying to improve during the period when they were really historically dominant, which is fun and historically accurate :)

True, this might make a neat scenario, but I think it would be best to keep it out of a generic build. The more complex AI behavior we try to introduce, the greater the likelihood of error. And as a general principle, I'd rather have the AI with few preconceived notions of how to play.
 
If you have a save game which has a reproducable crash or hang (either in loading the save, or in performing some action, or ending turn), please post the save.

I would encourage everyone testing BetterAI to change their ini file to save every turn, and increase the total number of saves to at least 30. This way, you can go back several turns, if necessary, to find the trouble spot.

Thanks,

-Iustus

I'll go back thru my save files tonight and see if I can find one. BTW, how does one change the *.INI file?
 
I agree but there were 2 advantages I see :

- usually, your UU has no equivalent at the same tech level, that's why it's generally a good idea to use it for offense, you're not likely to meet equivalent units elsewhere at the same tech level. My idea there is always the same : make the AI use its strength, so being aggressive if this is his trait, spamming cottages if they are financial, generating great people if they're philosophical, building more wonders if they're industrious and use its unique unit to attack too... exactly like the good human players do.

- you would see the civs trying to improve during the period when they were really historically dominant, which is fun and historically accurate :)
The problem with this is that if, for example, you don't have horses until you're already making macemen, there's no point having Genghis build any keshiks. The "Unique Unit" may never be a "Useful Unit."
 
My idea there is always the same : make the AI use its strength, so being aggressive if this is his trait, spamming cottages if they are financial, generating great people if they're philosophical, building more wonders if they're industrious and use its unique unit to attack too... exactly like the good human players do.

Sorry to change the topic a bit, but this triggers something that I've been thinking about and also relates to some other posts I've seen. That is that just playing to the strength is not by itself a winning strategy. For example, having the most money or being the most advanced technologically are not win conditions. One must do something useful with that edge.

What I'm wondering is whether Mansa and others that used to always beat me with the Space Ship are still capable of winning that way. Yes, I see them get way ahead on tech and sometimes have oodles of money. I've been playing nothing other than Better AI builds since the first and I can't remember losing in any way except by being crushed (or hopelessly stalled) by military or once losing to an AI Cultural Victory.

Are the AIs still winning with Space Ship? Anyone care to admit defeats?
 
Blake could you please check-in the fixed source codes to sourceforge? I just can't wait anymore , i will just build it myself and play :)

(i feel like eric cartman hyping for nintendo wii...:))

It's checked in now, knock yourself out.

PS. To others, builds are generally released once there are no major outstanding issues. At this point the infinite turn and the slowdown still remain to be fixed. I'll be working on the slowdown next.

I think the build governor is in general working very well. It's so far beyond the original version that it's like governor "3.0."

However, selecting multiple emphasis options doesn't always produce sensible results. If, for example, I select beakers and hammers, I'd like it to produce more hammers than if I select beakers alone, and more beakers than if I select hammers alone. (Hopefully you didn't have to re-read that too many times.) I think that at the moment this isn't working correctly.
If you have specific examples of where you feel it's not working, and a specific idea on HOW it should be working then feel free to post a screenshot or save (for this kind of problem screenshots often suffice).

I'm aware that the emphasize buttons don't always work as expected. For example it's possible that emphasize food will increase production or commerce, this is because emphasis food then disables the "anti starvation" code, emphasize food values ALL food very highly, the anti-starvation code values certain tiles (those needed to avoid starvation) ludicrously highly (like 100x more than normal), in borderline cases it's entirely possible that anti-starvation will value food more highly on average than emphasize food - thus emphasis food reduces the value put on food and results in more hammery/commercy tiles being worked. If I ever get around to a full rewrite of that governor code this piece of bizarreness will be one such fixed.


Also, I wonder, is there a way to get more functionality out of the user interface while maintaining the "no changes to UI or save compatibility" rule. For example, if you have "emphasize GP" selected, could it do something intelligent like:

1) If you have any yellow-boxed specialists, only create more specialists of that type (avoid contamination)
It already works this way, I believe.

2) If you have no yellow-boxed specialists, and there are GP points from wonders etc., only create specialists of that type/those types (again, avoid contamination) - if that doesn't satisfy the user's desire (because there aren't enough buildings to allow maxed-out GP production) then the user can tweak it manually
National Epic artist pollution? Just yellow box what you really want?
 
I'll go back thru my save files tonight and see if I can find one. BTW, how does one change the *.INI file?

I too would like to know where and how exactly to change this. This way if I encounter another crash like the last mp game I was playing, I can track it down and post a copy of the save. Thank you.
 
I'll go back thru my save files tonight and see if I can find one. BTW, how does one change the *.INI file?

In "My Games/Warlords/" you will find a the ini config file:
warlordspath.jpg

iniconfig.jpg


This is a regular text file, you can double click it and edit it in NotePad.

These are the lines I change for autosaving:
Code:
; The maximum number of autosaves kept in the directory before being deleted.
MaxAutoSaves = 20

; Specify the number of turns between autoSaves.  0 means no autosave.
AutoSaveInterval = 1

For those who want to turn on chipotle cheat code, to see more detailed information about what is going on, change these lines:
Code:
; Move along
CheatCode = chipotle

Hope this helps,

-Iustus
 
Back
Top Bottom