 |
|  |
 |
|
MrBaggins
|
|
I'm all for as naturally a tough AI, without as many artificial benefits as possible.
Having said that, I'm also after a challenging and competitive game. Just as long as the cheats aren't "in my face".
A simple fact, Tamerlin, is that the state of AI is really pretty crap. In a game like CtP2, you are trying to emulate human behavior. The technology just isn't there to do that. There is no simple way to simulate learning: connective-reason based adaptation.
Without that, an AI will always be second class. You can try to think of all of the conditions and how to deal with them, but a human will always "plan b" you.
So... you either put up with some amount of AI bonus, and foreknowledge... or you have a ridiculously easy game.
Which would you prefer, Tamerlin?
|
|
|  |
 |
|
Gilgamensch
|
|
France
Jun 2002 time: 06:29
|
|
Actually a similar system as I mentioned above (table) could be used for the AI to optimise cities.
this table would kind of look like:
74,0,0,0,0
73,0,0,0,0
72,1,0,0,0
71,1,0,0,0
First digit being hapiness, second # of entertainers, third # of workers...etc.......
We could include a modifier in the end (like a counter) to sum up when it shall change (i.e. 3 for -69, if it would have 20 points, time to change the national settings.....)
Only an 
|
|
|  |
 |
|
MrBaggins
|
|
Hmmm.. hadn't got there... and its a bit more complicated than that, since you can consider whether its better to change empire sliders globally or build happiness improvements instead. Then you get into considering Guns or Butter, and how that should be prioritized.
But, yes, its ridiculous that the AI doesn't ALWAYS use entertainers to keep cities out of rioting.
|
|
|  |
 |
|
Peter Triggs
|
|
Gone Fishin, Canada
Jan 2000 time: 05:29
|
|
I think that the blatantly obvious AI cheats are own fault. In order to try to make the game more challenging, most mods tweak the data in DiffDB to the point where the AI's advantages can become too obvious.
|
|
|  |
 |
|
MrBaggins
|
|
So.. in a moment of brainstorming, I was looking to find a cheaper method for measuring the threat to a specific map point.
You can use threat mapping, but it can tend to get computationally expensive, so I considered a different data model, which should scale well, if be initially less precise;
A "radar" system
an area which the AI wishes to defend... a city, say, has a (complicated by the tiled map location system) x, y location.
You can iterate through all the armies to find units within a particular range, calculated from the x,y, not dealing with the actual travel distance yet.
You then have a quick data set, which you can use to determine the total volume of possible threats.
Where appropriate (basically where the threat was significant, and where there were insufficient local defenders to deal with the problem,) more detail can be processed about the "radar picture"... actual travel time, troop types & strengths.
Its actually better than an influence map: While it wouldn't accurately describe the threat at a distance (it doesn't understand direction... just range,) its actually more accurate, because it deals with flanking; it would "group" two discrete threats approaching from different directions, where an influence map wouldn't until they were right on you... the map wouldn't describe the actual threat combined until distance was 0, which is too late.
Incidentally, cities, or other map points, within the context of the AI should include a data structure to include spillover defensive troops, so that theoretically more than 12 troops can defend a location, 12 in the city and more loitering outside.
Last edited by MrBaggins on 31-12-2003 at 09:06
|
|
|  |
 |
|
MrBaggins
|
|
quote: Originally posted by hexagonian
The real culprit in the Mods is the PW/gold bonus SLIC file. I drastically scaled down the PW/Gold SLIC cheat for my personal Cradle setup - the end result was that it was a lot more subtle and realistic. Most cities were about the same size as mine, and the amount of tile improvements around them were only slightly greater than mine.
And the tech gap certainly wasn't as drastic either.
As I noted in the city cap thread, most of the civs were close to their caps too. Once I was able to get the civs to do that, the inflated bonuses (especially from that SLIC file) are not needed. |
What are the AI bonuses you're running with in diffdb, same as standard Cradle?
|
|
|  |
 |
|
Peter Triggs
|
|
Gone Fishin, Canada
Jan 2000 time: 05:29
|
|
quote:
The real culprit in the Mods is the PW/gold bonus SLIC file. I drastically scaled down the PW/Gold SLIC cheat for my personal Cradle setup
|
I did it a different way: I didn't use that file at all. Instead, I put in an infrastructure workaround which simulated the infrastructure thing in the AI's buildlists (which it never used). Instead of churning out unnecessary and support costly units, I could have the AI switch some of it's cities to infrastructure (like I, as a human player, do).
BTW, I have it set up so that this option becomes available with Slave Labor, i.e. right from the beginning. CTP2's public works system is just so much better than civ2's. The other thing they put in, infrastructure corresponding to capitalization, was another great idea but they didn't exploit it enough.
|
|
|  |
 |
|
MrBaggins
|
|
Just a little note on this. I was reading (in B&N) a couple of what are apparently the best conceptual books on AI coding...
AI Game Programming Wisdom (1) and 2...
I've ordered them from Amazon, and they'll be arriving directly.
They demonstrate an approach to deal with transport of units (and cooperation of units in other ways) by using FSM's (Finite State Machines, not Fuzzy State Machines, which would be FuSM's.)
Individual armies each are their own FSM, communicate with others, using set rules, and goals, act in a predetermined although sensible and useful manner. This allows cooperation, and realistic tactics, such as naval invasion, combined attacks and defense.
FSM's are typically used in FPS's and RTS's and have shown a lot of promise in teamed behavior.
The FSM approach would work well for tactical movement, but we'd probably want other approaches for decision making elsewhere.
Last edited by MrBaggins on 10-03-2004 at 22:14
|
|
|  |
 |
|
MrBaggins
|
|
Yes.. FPS's have far less actors, but they act in real time, and FSM's are really quick, and ultimately the least part of the processing taking place, anyway... very little processing is done per communication, or query. Most of the CPU work is dealing with various DirectX processes.
RTS' also use FSM, in real-time, but do those with far more actors (and every unit is individual, rather than in the civ concept, where you have groupings.) These are more akin to the amount of work necessary, and if it can be done in real time, then it definitely can be done in TBS.
|
|
|  |
 |
|
MrBaggins
|
|
There are two of them.... and each have slightly different stuff. They are $70 US retail each, but I've got them from amazon for a bit more than $40.
When I've got them I'll let you know which is the more applicable.
|
|
|  |
 |
|
MrBaggins
|
|
quote: Originally posted by Locutus
*SNIP*
I really haven't looked into what the current AI looks like yet, do we know what kinds of algorithms it currently uses for this purpose (if anything)?
*SNIP* |
Yes... it uses "agents". There is a goal system, which is used by the AI scheduler to task squads (groups of agents.)
The essential difference is that the agents are essentially dumb. They are "told" what to do, pretty much directly from above. Its possible for you to have smart behavior using this system, but typically much harder. You have to deal with many more exceptions, and basically abstract multiple state machine behavior in one pass... not easy.
A FSM is smart in that it listens and talks to other FSM's, and acts appropriately. The individual parts aren't that complicated, but when they work in concert, they are moreso.
|
|
|  |
 |
|
MrBaggins
|
|
Chad Dawson (Stainless Steel Studios) of Empire Earth fame wrote most of the stuff that stood out to me, as being most applicable to what I'd *like* to be able to do.
My favorite title of any article wasn't by him, however... it would be "How Not To Implement a Basic Scripting Language" by Mark Brockington (BioWare), Mark Darrah (BioWare) regarding NeverwinterNights. Quite the interesting tale of woe.
|
|
|  |
 |
|  |
 |
|
Fromafar
|
|
quote: Originally posted by st_swithin
A* is the WORST pathfinding algorithm EVER!!!
Actually, A* should have been [0] in the array of 'required bug fixes.'
|
She may have been (partly) right after all. I just found out that the CTP2 implementation of the pathfinding algorithm does not do A* justice. When a node is in the open node list, it is not updated when a better path is found.
So, with the Activision* algorithm, you may get something like:
http://apolyton.net/upload/view.php?file=32273_ActivisionStar.jpg
While with a correct A* implementation, you could get:
http://apolyton.net/upload/view.php?file=32273_Astar.jpg
Looks much better, doesn't it?
|
|
|  |
 |
|
Maquiladora
|
|
On a different note, can someone look at making the AI place all its tile improvements around the INNER most ring/s before it starts placing on any outer rings? It seems like a dodgy leftover from CtP1 or something. It would help the AI alot.
|
|
|  |
 |
|
Gilgamensch
|
|
France
Jun 2002 time: 06:29
|
|
Actually I think this would need to be tied with the discussion about Governor. The AI shall build useful, so in other words if surrounded by hills, convert forest to grassland and stuff like this.
|
|
|  |
All times are GMT. The time now is 05:29. Apolyton Time is 00:29. |
top of page
|
|
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|