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
Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:29
  Old Post 14-08-2003 03:13 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#61 Report this post to a moderator
Get a bigger avatar today!

You don't have to recalculate the entire map, just those sections that change.

Dale is offline Dale
King
Sir! Why do you keep clicking on me?
Dec 2000
time: 15:29
  Old Post 14-08-2003 03:44
Edit/Delete Message Reply w/Quote
#62 Report this post to a moderator
Increase the size of your Attachments

LD:

What you say is true, but remember the terrain influence map will never change. It's the threat map that's dynamic. If you setup the threat map to calculate threats in an area, then it's not going to be changing too much every turn. In the game you can only move a unit a couple of tiles. Sure roads and such speed this up, but the general threat in the area is still going to be reasonably static. What I did was this:

- Have in my node struct the threat level value (means the unit remembers the threat of each node in its path when calculated).
- Have the threat map update each turn (only need to do it once per player).
- Have each unit compare threat levels in the nodes in its path against the new threat map (takes no time at all).
- If the threat level has changed by a set amount, recalculate the pathfinding (giving the unit a new path).

So effectively, the unit picks out a path to the target. It moves for a few turns, keeping an eye on the threat changes on its path. If the threat changes by the set change amount on its path, it calculates a new path taking the new threats into account. So as an enemy moves across its path, the unit will deviate around the enemy unit, eventually going back to its original path.

Solver is offline Solver
Apolyton Duke Of Something
Latvia, Riga
Sep 2000
time: 07:29
  Old Post 04-09-2003 17:31 Visit Solver<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#63 Report this post to a moderator
Browse Apolyton AD-FREE

*BUMP*

Currently thinking that the AI will need a good re-work of its diplomatic priorities. In every game I have played, for instance, the AI never seems to value peace for anything. I'm rather tired of civs regularly declaring war at me 2-3 turns after ceasefire.

At same note, make them respect borders.

And I'm interested in how far can we go in creating a non-cheating AI. In SAP2, for instance, AI gets a pretty decent science bonus, you know... and extra PW, too.

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

A little *bump* now the source is out.

MrBaggins is offline MrBaggins
King

May 1999
time: 05:29
  Old Post 02-11-2003 03:30
Edit/Delete Message Reply w/Quote
#65 Report this post to a moderator
Support Apolyton buy from Amazon

A while back I was considering different AI mechanisms, but went on sabatical waiting to see if they'd actually release the source code. Now that they have... maybe time to continue the discussion?

I thought about approaching the issue of problem solving from a data centric POV, but with a programatic twist.

For example, consider AI's chosing technology.

You could (and CtP2 does) use an ordered list (per personality in the case of CtP2).

An issue with this approach is that its not reactive to circumstances.

An approach I considered was a text file, that assigns "base values" to certain options, then allows for conditions within the file, to assign modifiers (multiplication, division, addition, subtraction) to those base values, based on game state information.

These values form the basis for simple probability based choice. As a simple example, consider that the result of this file produces the following options (out of available techs) for the "next technology" of a particular AI.

Seafaring 3
Iron Working 5
Ceremonial Burial 2

In my conceptual system, there is a 3/10 chance of Seafaring being chosen, 1/2 for Iron Working and 1/5 of Ceremonial Burial... thus it will likely be Iron Working, but will not be predictable to the human opponent.

Essentially the AI, will be slightly unpredictable, but will probably build approapriately.

Consider how the preceeding information might be generated with an extremely simplified file.

code:
AI_TECH_GOALS.TXT Base { TECH_SEAFARING =1 TECH_IRONWORKING =1 TECH_CEREMONIALBURIAL =1 TECH_CODEOFLAWS =1 } IF MAPSTATE(HomeContinentSize) < 300 //Home continent smaller than 300 tiles { TECH_SEAFARING *3 } IF GAMESTATE(MilitaryGrowthDelta,10) < -25 //Miltary growth 25% lower than average over 10 turns { TECH_IRONWORKING +4 } IF GAMESTATE(GovernmentCityCap,0) - GAMESTATE(PlayerCities,0) <5 //Current Player is within 5 cities of the city cap { TECH_CEREMONIALBURIAL +1 TECH_CODEOFLAWS +1 }


Of course the file would be significantly more complex than this, but would allow for rapid development of AI strategy and intuitive understanding of changes.

Multiple layers of conditions simulate considering a complex system. The probability ensures non-predetirmined behavior.

You could introduce messaging between goal files to reduce redundant expensive gamestate calls, and to introduce "personality" ala CtP2 within a flat system.

There would be GOAL files for General empire settings, General production, city specific production, city specific worker assignment and technology.

Thoughts? comments?

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:29
  Old Post 02-11-2003 04:04 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#66 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

Basic idea sounds good, but why make it random? I'd rather have the AI be slightly less predictable (but with a complex gamestate checker it'd soon be too complex to follow for humans anyway) but always have it make the best possible decision, i.e. pick the tech with the highest priority.

LDiCesare is offline LDiCesare
King
La Ferté sous Jouarre France
Jan 2001
time: 05:29
  Old Post 02-11-2003 04:11
Edit/Delete Message Reply w/Quote
#67 Report this post to a moderator
Support Apolyton or Terrorists Win

Randomness is good because for map dependant criteria (seafaring for example), playing on a given map type will allow for more unpredictability.

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:29
  Old Post 02-11-2003 04:24 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#68 Report this post to a moderator
Support Apolyton, buy Civilization: The Boardgame

Make it 'perfect' for Deity, and increasingly random for lower difficulty levels, thereby increasing the chances that it makes the 'wrong' decision?

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:29
  Old Post 02-11-2003 06:06 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#69 Report this post to a moderator
Inflate your Upload Space

I think what you're suggeting is essentially a fuzzy logic system, and putting it in that framework might make it more general and easier to understand and implement, or then again it might just cause excessive confusion and obfuscation, as seemed to happen with the CTP1 fuzzy logic system.

MrBaggins is offline MrBaggins
King

May 1999
time: 05:29
  Old Post 02-11-2003 09:01
Edit/Delete Message Reply w/Quote
#70 Report this post to a moderator
Increase the size of your Attachments

Its a psuedo-fuzzy system. The conditional operands on the values definitely are fuzzifying, but its less granular than a real fuzzy system.

The advantage is that it is much more approachable in human terms, easily extendable, and...

Has a very simple defuzzification process... the output using the values as probabilities.

The main issue with CtP1 fuzzy AI, as I recall was the defuzzification.

Kull is offline Kull

King
El Paso, TX USA
Mar 1999
time: 22:29
  Old Post 03-11-2003 09:53 Visit Kull<br><a href=/members><img src=/forums/images/lifer-icon.gif border=0></a><BR>'s homepage!
Edit/Delete Message Reply w/Quote
#71 Report this post to a moderator
A Different Approach? Support Apolyton, pre-order Civilization IV

Some proposals for a different approach to the CTP2 AI:

1) What if "civilization type" actually meant a different AI strategy? For example, some civs would just find war completely abhorent and would focus their attention on trade, science, or exploration. Others could be aggressive and miltaristic, with a set of strategies tuned toward that goal. On the surface this might sound even more diffcult than programming a "single" AI, but in reality it's easier - after all, it simply narrows the list of options that each AI mode has to choose from (as opposed to "one strategy fits all" programming which tries to mimic the human ability to handle every eventuality). Some additional features of this kind of system could include:
- hard coded (but preferably "moddable") advantages such as lower unit or building costs, faster research times, and/or greater movement allowances depending on the AI "focus".
- strategies that change. For example, continued warfare against a trading civ could "flip" them to militaristic.
- similar civs types would be more likely to ally (or even merge!)
- AI mode could be tied to government type (another way in which they might alter over time).

2) Speaking of "one strategy fits all", that wasn't true in human history, so why is it always a feature of civ games? Sure there are minor cultural tweaks, but in the end it's all about building cities, researching techs, and building an army large enough to dominate the planet. But not all cultures chose this path, and the fact that it's the current winner doesn't mean that no other options should be available at the start. One interesting alternative would be two or three "nomad" civs that roam around a defined area (such as was true in the north american plains or the russian steppe) that generate gold and units directly from the terrain (no city/building interface) and which have the ability to explode into vast conquering hordes from time to time. Another alternative would be a piratical "city sacker" civ akin to the Dark Ages Vikings or the Sea Peoples of the Late Bronze Age. The common thread here is a narrowly focused AI that adds an air of extreme unpredicability to the early and middle stages of the game.

3) Not specifically an AI issue, but I'd think real hard about whether techs should even be AVAILABLE for trade. Casting an eye back on history, let's face it - Civilizations DID NOT TRADE OR SELL KNOWLEDGE! Did it spread out beyond the originating civ? Sure. But this was usually a result of conquest or as a side benefit from trade or a common religion (or - espcially in the modern world - via spies). But kings flat out didn't trade techs and maybe it's time we thought about eliminating this utterly ahistorical feature of the civ genre. Personally, I think it would greatly enhance game play. One of the neat features of the Cradle mod is that it's almost impossible to trade for techs, and as a result you HAVE to pay attention to research (by contrast, what's going on in Civ3 is an abomination). I'm not saying it should be impossible to acquire techs from other civs, but please consider restricting it to "real life" methods. (And maybe include a toggle button for those who simply can't imagine life without the ability to trade or purchase technologies!)

Dale is offline Dale
King
Sir! Why do you keep clicking on me?
Dec 2000
time: 15:29
  Old Post 03-11-2003 10:49
Edit/Delete Message Reply w/Quote
#72 Report this post to a moderator
Avatar Enlargement: We've got the solution

Some sort of "tech through trading" should be available though.

A lot of spies were traders who went into other nations, looked at the technology that nation had, then took the info back to their own nation. On the way they did honest trading as well.

cue is offline cue
Settler

Nov 2003
time: 05:29
  Old Post 03-11-2003 17:29
Edit/Delete Message Reply w/Quote
#73 Report this post to a moderator
Browse Apolyton AD-FREE

Sorry to just jump in like this.
But i think this sounds very good.
If you conduct trade you get substantial financial gain, but technology/science should "leak" between the trading civilizations. This could help keep the game at a balance.

(Maybe this should be in another thread, Feel free to move this).

quote:
Originally posted by Dale
Some sort of "tech through trading" should be available though.

A lot of spies were traders who went into other nations, looked at the technology that nation had, then took the info back to their own nation. On the way they did honest trading as well.

MrBaggins is offline MrBaggins
King

May 1999
time: 05:29
  Old Post 03-11-2003 18:22
Edit/Delete Message Reply w/Quote
#74 Report this post to a moderator
Re: A Different Approach? Browse Apolyton AD-FREE

quote:
Originally posted by Kull
Some proposals for a different approach to the CTP2 AI:

1) What if "civilization type" actually meant a different AI strategy? For example, some civs would just find war completely abhorent and would focus their attention on trade, science, or exploration. Others could be aggressive and miltaristic, with a set of strategies tuned toward that goal. On the surface this might sound even more diffcult than programming a "single" AI, but in reality it's easier - after all, it simply narrows the list of options that each AI mode has to choose from (as opposed to "one strategy fits all" programming which tries to mimic the human ability to handle every eventuality). Some additional features of this kind of system could include:
- hard coded (but preferably "moddable") advantages such as lower unit or building costs, faster research times, and/or greater movement allowances depending on the AI "focus".
- strategies that change. For example, continued warfare against a trading civ could "flip" them to militaristic.
- similar civs types would be more likely to ally (or even merge!)
- AI mode could be tied to government type (another way in which they might alter over time).

2) Speaking of "one strategy fits all", that wasn't true in human history, so why is it always a feature of civ games? Sure there are minor cultural tweaks, but in the end it's all about building cities, researching techs, and building an army large enough to dominate the planet. But not all cultures chose this path, and the fact that it's the current winner doesn't mean that no other options should be available at the start. One interesting alternative would be two or three "nomad" civs that roam around a defined area (such as was true in the north american plains or the russian steppe) that generate gold and units directly from the terrain (no city/building interface) and which have the ability to explode into vast conquering hordes from time to time. Another alternative would be a piratical "city sacker" civ akin to the Dark Ages Vikings or the Sea Peoples of the Late Bronze Age. The common thread here is a narrowly focused AI that adds an air of extreme unpredicability to the early and middle stages of the game.

3) Not specifically an AI issue, but I'd think real hard about whether techs should even be AVAILABLE for trade. Casting an eye back on history, let's face it - Civilizations DID NOT TRADE OR SELL KNOWLEDGE! Did it spread out beyond the originating civ? Sure. But this was usually a result of conquest or as a side benefit from trade or a common religion (or - espcially in the modern world - via spies). But kings flat out didn't trade techs and maybe it's time we thought about eliminating this utterly ahistorical feature of the civ genre. Personally, I think it would greatly enhance game play. One of the neat features of the Cradle mod is that it's almost impossible to trade for techs, and as a result you HAVE to pay attention to research (by contrast, what's going on in Civ3 is an abomination). I'm not saying it should be impossible to acquire techs from other civs, but please consider restricting it to "real life" methods. (And maybe include a toggle button for those who simply can't imagine life without the ability to trade or purchase technologies!)


A lot of 1 & 2 is already represented in the CtP2 AI, in the form of personalities. These are a good idea. The problem is that the behaviors aren't different enough. You don't want to give different civs different bonuses. Thats illogical... all civ's are basically the same, their differences come in different resources, and behaviors.

The problem with radically different behaviors, is that to include them in the game, they have to be viable.

An economic approach. A resource approach (like communism, but successful.) A diplomatic approach. A military approach. A scientific approach.

We have to consider ways of ensuring that there isn't just 2 ways to play CtP2. Expansionist/Science Victory and Expansionist/Military Victory.

I considered the problem a long while back, and came upon an idea based on OCC challenge. Make a government with extremely limited empire size, and punitive distance penalties. Give them superb city bonuses. Of course, it will need to be balanced, but could simulate countries that either have very limited space or are naturally insular.

3. I agree. Insta-advance is dumb. Including trade as a factor in tech spread would simulate what needed to be simulated, well. The fact that the AI's are mostly behind tech wise in CtP means that tech trading is almost never worthwhile. Usually the AI's are pissed at the human too... of course. Civ3 is the obvious lesson why easy diplomatic tech trading=bad thing.

Tamerlin is offline Tamerlin
King
Toulouse (South-western France)
Apr 2002
time: 06:29
  Old Post 03-11-2003 18:37
Edit/Delete Message Reply w/Quote
#75 Report this post to a moderator
Help yourself to an AD-FREE life

As far as I am concerned the work on the AI should first focus on the use of military units as the AI civs often have a good number of units but are unable to stack them properly and move them towards the good targets.

Solver is offline Solver
Apolyton Duke Of Something
Latvia, Riga
Sep 2000
time: 07:29
  Old Post 03-11-2003 22:44 Visit Solver<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#76 Report this post to a moderator
Support Apolyton, buy Civilization 2

Personalities are indeed already in CtP2, but I agree that we should try to enhance them if possible, to really make their reactions differ more.

As for killing tech trade, I wouldn't agree. One of my favorite parts about Civ is being able to get a nice juicy tech deal. After all, many technologies can realistically be sold, in form of schemes, graphics, etc. Although technologies such as Democracy or Philosophy can hardly be... they're more of concepts than actual things.

MrBaggins is offline MrBaggins
King

May 1999
time: 05:29
  Old Post 03-11-2003 22:49
Edit/Delete Message Reply w/Quote
#77 Report this post to a moderator
Support Apolyton buy from Amazon

Juicy deals are a problem though. Having easy tech trading devalues human research, and focuses the game on economics and military issues.

This leads us to consider making tech trading very difficult. If its difficult enough, to rarely happen, though... why not just scrap it, and include a better mechanism?

centrifuge is offline centrifuge
Prince
USA
Apr 2002
time: 22:29
  Old Post 03-11-2003 23:25
Edit/Delete Message Reply w/Quote
#78 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri

Kind of along those lines, it is too easy to get a diplomatic victory with CTP2, simply by threatening war against the AI in order to make it sign peace treaties and alliances after the first meeting with them.

This is certainly something for the future, after other bugs have been worked out, but it needs to be addressed in order to make the game play more robust and challenging.

MrBaggins is offline MrBaggins
King

May 1999
time: 05:29
  Old Post 04-11-2003 07:32
Edit/Delete Message Reply w/Quote
#79 Report this post to a moderator
More AI thoughts: Army Definition Tired of ads?

An issue with CtP2 AI, is, among other things, a problem dealing with naval invasions, and problems utilizing specific units like missiles, and to a certain degree airpower in general.

Part of the issue is a very flat design in definition of how armies, navies and airwings are constructed.

Units are catagorized in flat catagories. The catagories are hard coded.

Improving army behavior and coordination is important, but also important is flexible definition. Thoughtful, reactive and flexible construction of armies is important.

Army construction is obvious to seasoned CTP2 vets...

For instance, to defend, mix good defensive units, like phalanxes, with ranged units like archers. Movement rate is unimportant for a garrison, although troop types should be evenly distributed across these catagories. You might consider some counter bombard artillery if you know your enemy will field artillery.

With an attacking force you may wish to have strong flanking units, and siege units are a consideration too, but you might, as a human player, chose to build fast (without bombard) and slow (with flanking) stacks, for different purposes.

Adding in special units, and considering settler escort, and so on and so forth add much complexity.

That doesn't begin to address varied naval tasks such as Strike/Bombard groups, Sub hunters, Transport Convoys, and Carrier groups, or air wings.

CtP1 went a long way in introducing flexible and intuitive ways to define how armies get constructed (and CtP2 is a step backwards,) but we have the opportunity to improve on even that system.

The following is an example of how an example army definition might be made.

code:
{garrison_early} SIZE_MIN 1 SIZE_MIN_REC 2 SIZE_REC 4 SIZE_MAX 4 1:8:UNIT_LEGION 1:6:UNIT_PHALANX 1:4:UNIT_WARRIOR 1:2:UNIT_ARCHER 2:8:UNIT_ARCHER 2:6:UNIT_LEGION 2:4:UNIT_PHALANX 2:2:UNIT_WARRIOR 3:8:UNIT_LEGION 3:6:UNIT_PHALANX 3:4:UNIT_WARRIOR 3:2:UNIT_ARCHER 4:8:UNIT_ARCHER 4:6:UNIT_LEGION 4:4:UNIT_PHALANX 4:2:UNIT_WARRIOR {end}


The first line describes the identifier of the definition, then the SIZE lines define the absolute minimum and maximum, recommended minimum and optimum size of the unit. The other lines are the actual definition of the units that should be used.

The first number is the "troop number". All the "1's" define the how the first troop should be chosen, then the "2's" the second, and so on, til the max is reached.

The second figure, after the ":" is the priority. A higher number is a higher priority.

Lastly, there is a unit identifier after the next ":".

In the example, an early garrison is defined, with a minimum of 1 and maximum of 4 units specified. 2 is a recommended minimum number of units and 4 is an optimum.

The first unit is preferrably a defensive units, with reducing priority for less capable units. Lastly, if no substitute is available, an archer is specified.

The second unit is reversed, with preferrably a ranged unit, then a defensive unit, in reducing priority.

Thus you can specify both best case and less optimal solutions for army definitions, with limits too.

---

thoughts? comments?

Gilgamensch is offline Gilgamensch
King
France
Jun 2002
time: 06:29
  Old Post 04-11-2003 14:04
Edit/Delete Message Reply w/Quote
#80 Report this post to a moderator
Remove this text

MrBaggins,

sounds like a nice idea , BUT

1.) What about inland cities? They shall have a lower priority, so the priority itself should be more a variable, which could/would be changeable according to location/needs.
2.) Do we want to include 'automatic' upgrades to never units?
3.) Depending how the enemy, espacially the human attacks, this should be taken into consideration as well. Like archer's don't help a lot against catapults, as they can bombard.

And just a thought, shall we not be able to introduce it as a one-liner, just kind of a table:




Unittype Warrior Archer continue
Warrior
12
Archer
12


I hope you understand my idea. This we actually could put in a txt file, making it easier to mod...........

Peter Triggs is offline Peter Triggs
Prince
Gone Fishin, Canada
Jan 2000
time: 05:29
  Old Post 04-11-2003 20:45
Edit/Delete Message Reply w/Quote
#81 Report this post to a moderator
Tired of ads?

When the AI is tasking it's units, it prepares a big list where it matches it's armies against possible goals. It then does a number of passes through this list, depending on the difficulty level that's been chosen, and executes some of those matches. Here's where this is done:

code:
cycle++; sint32 diff_cycles = 0; if (g_theGameSettings->GetDifficulty() == (LEVELS_OF_DIFFICULTY - 1)) diff_cycles = 2; if ( cycle < Scheduler::s_max_match_list_cycles + diff_cycles) { g_gevManager->AddEvent(GEV_INSERT_Tail, GEV_ProcessMatches, GEA_Player, playerId, GEA_Int, cycle, GEA_End); }


Both LEVELS_OF_DIFFICULTY and s_max_match_list_cycles are set at 6 elsewhere. By increasing the number of passes that the AI makes through its list, we can make it do more things. Azmel2 once remarked that he wished that he'd exposed this possibility. Well, now we've got the chance. Any suggestions?

Last edited by Peter Triggs on 04-11-2003 at 20:53

Gilgamensch is offline Gilgamensch
King
France
Jun 2002
time: 06:29
  Old Post 04-11-2003 20:52
Edit/Delete Message Reply w/Quote
#82 Report this post to a moderator
Increase Your PM Length

Peter,

I would need more information before being able to comment further. I haven't got anything installed of it, so don't know what is reffering to what .....sorry........

MrBaggins is offline MrBaggins
King

May 1999
time: 05:29
  Old Post 04-11-2003 23:48
Edit/Delete Message Reply w/Quote
#83 Report this post to a moderator
Lose 30 kilos (of popups)

Gilgamensch>

The principal I was explaining wasn't the entirety of how the AI constructs its armies. Its the way that an AI designer hints how the types of armies he uses should be constructed.

Another AI file would describe and give different preferences for different "missions" or "tasks" that get created. City garrioning is an obvious and necessary mission. I'd contend that you should be able to conditionally specify different Army defintions to different tasks, based on game state information, such as state of diplomacy, general threat levels, geographic situation, or myriad other issues.

As far as upgrades, I don't think they will drastically effect the system: units can be upgraded, but their essential capability; ranged attack, good defense or so on, shouldn't be destroyed in the process. How the army is initially constructed is important, in my mind, and it would only be improved by upgrades, so the AI wouldn't me crippled by the process.

Peter> Obviously we have to start by playing around with the existing AI.

The exact point you made about the hard coded bidding iterations, was in the back of my mind. Perhaps we should make it an exposed constant. Play testers could muck around with it, and report?

Colwyn is offline Colwyn
Prince
Melbourne, Australia
Aug 2000
time: 15:29
  Old Post 05-11-2003 10:31
Edit/Delete Message Reply w/Quote
#84 Report this post to a moderator
Make armies smaller! Support Apolyton, buy GURPS/ Alpha Centauri

You can make the AI 1000% better by making the stacks smaller ie say 6 units max.

This would have a profound impact on the game by reducing the all or nothing scenario with unit locations.

Think of it this way how much harder is it to attack a nation with units spread out along the border compared to defending one location! The AI can never compete with humans when playing with less "stacks".

CTP2 needs combat on fronts not scirmishes where the human can easily outmanouver the AI. For fronts we need spread out units and that means disallowing large stacks so we have 10 armies of 6 units(max) rather than 5 of 12.

Gilgamensch is offline Gilgamensch
King
France
Jun 2002
time: 06:29
  Old Post 05-11-2003 13:54
Edit/Delete Message Reply w/Quote
#85 Report this post to a moderator
Avatar Enlargement: We've got the solution

quote:
Originally posted by MrBaggins
Gilgamensch>

The principal I was explaining wasn't the entirety of how the AI constructs its armies. Its the way that an AI designer hints how the types of armies he uses should be constructed.

Another AI file would describe and give different preferences for different "missions" or "tasks" that get created. City garrioning is an obvious and necessary mission. I'd contend that you should be able to conditionally specify different Army defintions to different tasks, based on game state information, such as state of diplomacy, general threat levels, geographic situation, or myriad other issues.

As far as upgrades, I don't think they will drastically effect the system: units can be upgraded, but their essential capability; ranged attack, good defense or so on, shouldn't be destroyed in the process. How the army is initially constructed is important, in my mind, and it would only be improved by upgrades, so the AI wouldn't me crippled by the process.



MrBaggins,

don't disagree with it. My idea was mainly like yours, but slightly changed.

Instead of being hardcoded, I was thinking of using a txt-file with the stack infomormation in it. This would offer (for me) 2 advantages: 1.) You could change it easily later (like for mod's scenarios) 2.) it would be far more flexible.

And all what I suggested, was to put it in this txt-file, in kind of a table, comma-telimited. that was all. So the computer could read it, which units to stack and which ones not. I was a bit lazy to complete the table..........

So it should like this in the txt-file:

UNIT_WARRIOR,1,2,3,4,0,0,(continue as needed for all units),12,1,6,6,X,X,......(max in stack)
UNIT_HOPLITE,1,2,3,3,0,0,0,0,0 (........),12,12,6,6,X,X,.....(....)

This would mean:

for WARRIOR:

Take Warrior (1) if nothing else available or existing.
Take Hoplite (2) if available or existing.
Take Archer (3) if available or existing.
Take Catapult (4) if available or existing.
If the value is 0, this would mean, don't use it together with this unit. This might also be a good way to 'teach' the AI, what to stack and what not to stack..........

The numbers would also specify the base priority of what to use.
The numbers behind the first bracket, would indicate the maximum number to be used against the unit.

So 12 Warrior maximum if only Warrior available.
Maximum of 6 Warriors together with Hoplite.
Again maximum of 6 Warriors together with Archer and so on......

But as the first part would describe the priority to build for stacking, we shall never really have anymore Warriors after Hoplite......

For production-queues:

We might be able to use this information as well. Check the stacks, what is missing and choose according to the priority.

let me know what you think (I hope I did it clear enough )

MrBaggins is offline MrBaggins
King

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

You should note, Gilgamensh, that ANY change I'm considering, if it isn't process, but is data, or condition, will be in a human readable, and modifiable text file. This is the only way to ensure the ultimate modifiability of the AI engine. Important since there will be play testing plus changing needed to get a new system to work optimally.

Gilgamensch is offline Gilgamensch
King
France
Jun 2002
time: 06:29
  Old Post 05-11-2003 17:01
Edit/Delete Message Reply w/Quote
#87 Report this post to a moderator
Inflate your Upload Space

OK, also what I head in mind

But how you think about this suggestion?
I shall be doable, but I think we have to 'throw' out the old system for it........

MrBaggins is offline MrBaggins
King

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

There are some limitations to the system as is. Not least being its largely hard coded nature. I'd really don't see any technical reason why it can't be something better, ultimately.

Having said that, its a long term project, and I'd be happy with just tweaking the existing AI that we have to start with.

child of Thor is offline child of Thor
Emperor
UK
Jan 2002
time: 05:29
  Old Post 05-11-2003 18:30
Edit/Delete Message Reply w/Quote
#89 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

with reference to tweaking the current AI, has anyone looked at/tried this kind of thing.

We know the problem with the city caps - the player can ignore them if he/she wants too(using improvements,workers etc the penalties can be more or less negated), but the AI seems to stick close to the defined boundary.

The Mods have added various penalties for the player going over the city cap, but still over time the balance seems to go against the AI nations.

Is it possible to either make the AI ignore the cap or maybe better would be a larger cap, either set or dependant on how the player is doing? Finding the balance would be key - ICS for the AI hopefuly isn't the answer, but a way to unshackle the AI might improve the mid to long term game for the player?

What about making a settler unit more expensive(like much more expensive) as the player reached his/her current city cap?

Not very subtle i know, but could be comparitvely easy to impliment? just wondering if this had already been attempted/looked at during the previous mods?

Enjoying this discussion(even the stuff going over my head ), and as this may be the new CTP2's main feature(AI improvement), i hope it continues with some good implimentations

MrBaggins is offline MrBaggins
King

May 1999
time: 05:29
  Old Post 05-11-2003 18:45
Edit/Delete Message Reply w/Quote
#90 Report this post to a moderator
Full PM-box? Change here!

Well.. until I have a viable compilable source, I can only theorize, but I haven't forgotten any of the prior discussion on AI.

The AI needs to deal better with happiness on a more city level than it is. Those entertainers are life savers. It needs to do that, AND optimize the balance of happiness/production at the empire level.

 
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.0719 seconds (91.45% PHP - 8.55% 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