Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Call To Power II > CtP2-Source Code Project > DESIGN: AI Improvement discussion
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!
CivGroups
CTP2 Source Code Project (59): Not a Member - Join

bottom of page
  
Author
Thread   
Pages (4): [ 1   2   3   4   ]
< Last Thread     Next Thread > Post New Thread     Post A Reply
Tamerlin is offline Tamerlin
King
Toulouse (South-western France)
Apr 2002
time: 06:29
  Old Post 05-11-2003 21:25
Edit/Delete Message Reply w/Quote
#91 Report this post to a moderator
Get a bigger avatar today!

You all know my point of view, the less an AI cheats the better as far as I am concerned. I would prefer the AI to be taught how to manage its resources and respect the rules rather than giving it another advantage.

I don't like games in which only the human player has rules to obey to, if the rules are not the same for the AI where is the strategical part of the game?

MrBaggins is offline MrBaggins
King

May 1999
time: 05:29
  Old Post 05-11-2003 21:33
Edit/Delete Message Reply w/Quote
#92 Report this post to a moderator
Help yourself to an AD-FREE life

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 is offline Gilgamensch
King
France
Jun 2002
time: 06:29
  Old Post 05-11-2003 21:41
Edit/Delete Message Reply w/Quote
#93 Report this post to a moderator
Browse Apolyton AD-FREE

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 is offline MrBaggins
King

May 1999
time: 05:29
  Old Post 05-11-2003 21:45
Edit/Delete Message Reply w/Quote
#94 Report this post to a moderator
Enter the AD-FREE zone

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.

Gilgamensch is offline Gilgamensch
King
France
Jun 2002
time: 06:29
  Old Post 05-11-2003 22:04
Edit/Delete Message Reply w/Quote
#95 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

Actually those digits you might first run through the 'city manager' to decide upon building hapiness buildings (including polution).

I think it is just a question of changing the code and creating 'tables'.

But again haven't checked the code yet.

For sliders: Normally you use them once you run out of buildings/entertainers as well as in this order.

Or if you use in general to much entertainers..........

By the way, sometimes also depends on the city size..........

Tamerlin is offline Tamerlin
King
Toulouse (South-western France)
Apr 2002
time: 06:29
  Old Post 06-11-2003 00:17
Edit/Delete Message Reply w/Quote
#96 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri

quote:
Originally posted by MrBaggins
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?


I agree with you MrBaggins, but I would just like the cheats to be limited to the minimum. If an AI cheats I don't want it to be blatant (as in Civ2 or Civ3) or/and crude (as in Civ3) thus spoiling the pleasure I can have to play the said game. Giving some advantages to the AI is the most discreet one and does not worry me.

Solver is offline Solver
Apolyton Duke Of Something
Latvia, Riga
Sep 2000
time: 07:29
  Old Post 06-11-2003 00:29 Visit Solver<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#97 Report this post to a moderator
Get a bigger avatar today!

AI cheating should be as transparent as possible. That's the point, generally, not how much it cheats.

For instance, the CtP2 AI cheats blatantly with city sizes and expansion. That's very visible and spoils it for me. In Civ 3, if the AI only gets a 10% production boost, it's not too visible, but enough to make the AI stronger.

Peter Triggs is offline Peter Triggs
Prince
Gone Fishin, Canada
Jan 2000
time: 05:29
  Old Post 06-11-2003 00:55
Edit/Delete Message Reply w/Quote
#98 Report this post to a moderator
Support Apolyton, pre-order Civilization IV

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 is offline MrBaggins
King

May 1999
time: 05:29
  Old Post 31-12-2003 08:31
Edit/Delete Message Reply w/Quote
#99 Report this post to a moderator
Simple and cheap method for threat determination Increase Your PM Length

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

hexagonian is offline hexagonian
King
Gnawing on your mind...
Jun 1999
time: 23:29
  Old Post 31-12-2003 19:47 Visit hexagonian's homepage!
Edit/Delete Message Reply w/Quote
#100 Report this post to a moderator
Support Apolyton buy from Amazon

quote:
Originally posted by Peter Triggs
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.

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.

MrBaggins is offline MrBaggins
King

May 1999
time: 05:29
  Old Post 31-12-2003 20:01
Edit/Delete Message Reply w/Quote
#101 Report this post to a moderator
Support Apolyton buy from Amazon

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 is offline Peter Triggs
Prince
Gone Fishin, Canada
Jan 2000
time: 05:29
  Old Post 31-12-2003 20:34
Edit/Delete Message Reply w/Quote
#102 Report this post to a moderator
Support Apolyton buy from Amazon

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 is offline MrBaggins
King

May 1999
time: 05:29
  Old Post 10-03-2004 22:06
Edit/Delete Message Reply w/Quote
#103 Report this post to a moderator
Support Apolyton or Terrorists Win

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

child of Thor is offline child of Thor
Emperor
UK
Jan 2002
time: 05:29
  Old Post 10-03-2004 23:08
Edit/Delete Message Reply w/Quote
#104 Report this post to a moderator
Support Apolyton or Terrorists Win

Sounds intresting, the only negative thought i could come up with is that maybe the amount of 'book keeping' needed in a game like CTP2, as compared to an FPS. We can get a lot of armies and individual units in these games, more than you would get in a normal non internet connected FPS game?

He he - have fun with your book, i'm still trying to plug my way though 'Code Complete' and a book on C++, its hard going

MrBaggins is offline MrBaggins
King

May 1999
time: 05:29
  Old Post 10-03-2004 23:19
Edit/Delete Message Reply w/Quote
#105 Report this post to a moderator
Get a bigger avatar today!

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.

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:29
  Old Post 10-03-2004 23:43 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#106 Report this post to a moderator
Support Apolyton buy from Amazon

FSMs for tactical manouvering? Sounds sensible, that could certainly work. And fairly easy to program.
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)?

AI Game Programming Wisdom, you say? I guess I should look into those (if my bank account allows for it )...

child of Thor is offline child of Thor
Emperor
UK
Jan 2002
time: 05:29
  Old Post 10-03-2004 23:52
Edit/Delete Message Reply w/Quote
#107 Report this post to a moderator
Enter the AD-FREE zone

sounds reasonable

He he - lets face it any info on helping in improving the CTP2 AI is going to be a good thing. I think its quite sophisticated and was made to be - it just somehow never really got the polishing it needed, or at least it feels that way.

I know Pyraray when he is around might have more to say on it, there was some good stuff in those interviews Locutus ran a while back as well - about how the game was not rushed out, which seems a bit odd cause compared to CTP1, there are definatly more erm 'un-finished' bits to CTP2, and the vanilla AI did seem fairly uniterested the second time around?

Still if we can even just fix the bits that are in place(like all diplomacy issues/co-ordinated attacks/AI personalities etc) we will have accomplished good things.

MrBaggins is offline MrBaggins
King

May 1999
time: 05:29
  Old Post 10-03-2004 23:52
Edit/Delete Message Reply w/Quote
#108 Report this post to a moderator
Avatar Enlargement: We've got the solution

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 is offline MrBaggins
King

May 1999
time: 05:29
  Old Post 11-03-2004 00:03
Edit/Delete Message Reply w/Quote
#109 Report this post to a moderator
Full PM-box? Change here!

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.

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:29
  Old Post 11-03-2004 00:09 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#110 Report this post to a moderator
Support Apolyton or Terrorists Win

http://www.aiwisdom.com

Interesting, Soren Johnson (of Civ3 AI fame) wrote an aritcle in one of those books about TBS AI as well.

quote:
Abstract: Writing a turn-based AI presents a number of unique programming and game design challenges. The common thread uniting these challenges is the user's complete control over the game's speed. Players willing to invest extreme amounts of time into micro-management and players looking to streamline their gaming experience via automated decision-making present two very different problems for the AI to handle. Further, the ability to micro-analyze turn-based games makes predictability, cheating, and competitive balance extremely important issues. This article outlines how the Civilization III development team dealt with these challenges, using specific examples to illuminate some practical solutions useful to a programmer tasked with creating an AI for a turn-based game.


Browsing through the rest of the articles, sounds like 2 fascinating books (another Apolyton-related game that's covered is MoO3: an article about terrain analysis). For the right price I would buy them even if I didn't have any intention of using any of the knowledge (particularly part 2). Just reading about how the AI of some (types of) games works alone is fascinating enough.

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:29
  Old Post 11-03-2004 00:16 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#111 Report this post to a moderator
Support Apolyton, buy Civilization: The Boardgame

Hmm, my personal experience with agents is somewhat limited, but from what I understand about them that certainly seems like an awkward way of managing tactical manoevering. Based on the knowledge that I have, FSMs seem much more useful in this context.

MrBaggins is offline MrBaggins
King

May 1999
time: 05:29
  Old Post 11-03-2004 00:18
Edit/Delete Message Reply w/Quote
#112 Report this post to a moderator
Support Apolyton, buy Civilization 2

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.

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:29
  Old Post 11-03-2004 00:42 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#113 Report this post to a moderator
Support Apolyton, pre-order Civilization IV

There's lots of stuff there that sounds great. The Strategy articles about terrain and maps and the like stood out the most for me: the Steven Woodcock (Wyrd Wyrks) article about strategic dispositions, the MoO3 article about terrain awareness, the Shawn Shoemaker (Stainless Steel Studios) aritlces about map generation and transport AI.

I know a thing or two about writing scripting/programming languages already, so those articles have slightly less appear to me (though I'd still devour them).

Damn, why did you have to tell me about these books when my birthday is still 6 months away?

Fromafar is offline Fromafar
Prince

May 2003
time: 06:29
  Old Post 17-03-2004 04:11
Edit/Delete Message Reply w/Quote
#114 Report this post to a moderator
Tired of ads?

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?

Flinx is offline Flinx
Prince
Toronto, ON CANADA
Nov 2001
time: 00:29
Smile  Old Post 17-03-2004 06:22 Visit Flinx's homepage!
Edit/Delete Message Reply w/Quote
#115 Report this post to a moderator
Increase the size of your Attachments

Does this mean you (think you) fixed it? Yea!

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:29
  Old Post 17-03-2004 13:57 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#116 Report this post to a moderator
Increase Your PM Length

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 is offline Gilgamensch
King
France
Jun 2002
time: 06:29
  Old Post 17-03-2004 14:26
Edit/Delete Message Reply w/Quote
#117 Report this post to a moderator
Get a bigger avatar today!

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.

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:29
  Old Post 17-03-2004 15:15 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#118 Report this post to a moderator
Enter the AD-FREE zone

Ehm, the governor and the AI are one and the same thing, Gilg...

Gilgamensch is offline Gilgamensch
King
France
Jun 2002
time: 06:29
  Old Post 17-03-2004 15:27
Edit/Delete Message Reply w/Quote
#119 Report this post to a moderator
Remove this text

Maybe a bit bad expressed: For sure it is the same, otherwise we would have a schizophrenic AI.

Where I wanted to point at, is that the AI shall build according to the cities surrounding and global goal. And that is something which isn't really happening. It is 'only' building for growth even as it can't grow further. (simplified )

E is offline E
King
July 24,2005 Ctp2 Tiles in sig!
May 1999
time: 21:29
  Old Post 14-08-2004 01:14 Visit E's homepage!
Edit/Delete Message Reply w/Quote
#120 Report this post to a moderator
Full PM-box? Change here!

bump
for calvitix to use (if he needs it)

 
Pages (4): [ 1   2   3   4   ]
< Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:29.
Apolyton Time is 00:29.
    top of page
Rate This Thread:
Forum Jump:
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
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0742 seconds (91.61% PHP - 8.39% MySQL) with 36 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net