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 > Miscellaneous > Archive > CtP2-Creation/AI/Mods/Scenarios-Archive > Project: AI Unit Useage Script
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!

bottom of page
  
Author
Thread    < Last Thread     Next Thread > Post New Thread     Post A Reply
Dale is offline Dale
King
Sir! Why do you keep clicking on me?
Dec 2000
time: 15:19
  Old Post 30-04-2002 12:29
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
Project: AI Unit Useage Script Suffering from ads?

Hey all. Following on from discussions on the WAW thread, and between Dave and myself, I believe we have come up with a good working model for how the AI could perform in regards to army and naval movement. It's only in pseodocode form at present, but gives a 'plain-spoken' account of how the AI will work in this script.

Feel free to leave any comments/logic bugs/suggestions. This is the "AI army/naval improver" I've been crapping on about for the last week.

Attachment: ai unit useage.txt
This has been downloaded 29 time(s).

child of Thor is offline child of Thor
Emperor
UK
Jan 2002
time: 05:19
  Old Post 04-05-2002 01:12
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Browse Apolyton AD-FREE

Any of this make it into WAW? The transport thing seems familiar?
So as a brief overview, what this aims to do it stack the AI units on land first to attack any enemy cities/units on same continent. If no enemy exists on same continent it will check if at war elsewhere and moves stacks to costal cities, to board any transports and move transports to where the action is(and unload stacks to attack enemy). It also stacks Naval units with a mix of different units to attack enemy naval units(this can be any naval unit that is listed in the code right?).Seems sound enough.

On land units you specify 'attack' units, is this to ensure the AI doesn't put weird units in its front line when it attacks?(like having ranged units up front?).
Isn't there a way to make the AI produce the units in a certain order - say for example if its going to war and on the offensive then once it has reasonable city defense(2-3 defensive units of the best type it can feild), It starts to build armies in a ratio of roughly 50% Attack, 25%Flanking+25%ranged. Something like this. So it has reasonable balance in its stacks - but it is going out and attacking the enemy.
If on the other hand it starts to lose more battles than it's winning(can this be checked?), then its build queues change priority so it builds say 25%Attack, 25%Defense,25%Flank,25%ranged units.
Its still on the attack, but has some defensive units to help it.
If it starts to lose cities then it changes again to produce say 50%defensive and 50%ranged units. It stops attacking and looks to build up in its cities to (near) max unit capacity. Once this is done and if its stopped loseing cities it will start the process over again(if its still at war)?
It may already do this i guess? I was just wondering if this kind of level of AI response is open to the modders to mess around with?

Bluevoss is offline Bluevoss
Prince
Orlando, Florida
Dec 2000
time: 05:19
  Old Post 04-05-2002 04:29
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Remove this text

Will diplomacy be part of this? I know its getting to be a pretty big bite, but right now, everyone is pissing at me, and I haven't had a peace treaty ever.

Yeah, I want to get a good run from the AI, but I dont ALWAYS want to be at war.

child of Thor is offline child of Thor
Emperor
UK
Jan 2002
time: 05:19
  Old Post 04-05-2002 14:08
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Suffering from ads?

I've found that in the initial stages of the game(when your powergraph is ALWAYS the lowest), then no other nation will give you the time of day, to them all(bar the most peacefull ones) you are no more than kangaroo do-do on their shoe. So you will always have this problem untill you have started to dominate the game - then they will grovel. I think having looked at Dale's psuedocode this deals exclusively with the AI land and naval units tactics - so no diplomacy there!

Bluevoss is offline Bluevoss
Prince
Orlando, Florida
Dec 2000
time: 05:19
  Old Post 04-05-2002 18:21
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

When you think about it - it should be the other way around. When you are small and weak in the game, you should be able to do diplomancy to stay alive. Its when you get huge that everyone else should have it in for you.

i.e. What the game currerntly does makes historic sense. But it gameplay sense, its wrong. It should get harder and harder as you get bigger. In my current game, I was fighting tooth and nail against the Macidonians, and the Babalonians were running raids against me, burning fields, and just making my life a living hell. But now that I've FINALLY gotten the edge on the Macs, the Babs have suddenly quieted right down.

Maybe we need a code that triggers when you get to be more powerful then the 2nd and 3rd place races - they should combine (I mean , really combine - become one race under whoever was larger) - call it a diplomatic marrage or a suprise takover. Set them to totally hate you. That way, ballance would be restored to the games week endturns.

Peter Triggs is offline Peter Triggs
Prince
Gone Fishin, Canada
Jan 2000
time: 05:19
  Old Post 04-05-2002 18:50
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

quote:
Isn't there a way to make the AI produce the units in a certain order - say for example if its going to war and on the offensive then once it has reasonable city defense(2-3 defensive units of the best type it can feild), It starts to build armies in a ratio of roughly 50% Attack, 25%Flanking+25%ranged. Something like this. So it has reasonable balance in its stacks - but it is going out and attacking the enemy.
If on the other hand it starts to lose more battles than it's winning(can this be checked?), then its build queues change priority so it builds say 25%Attack, 25%Defense,25%Flank,25%ranged units.
Its still on the attack, but has some defensive units to help it.
If it starts to lose cities then it changes again to produce say 50%defensive and 50%ranged units. It stops attacking and looks to build up in its cities to (near) max unit capacity. Once this is done and if its stopped loseing cities it will start the process over again(if its still at war)?
It may already do this i guess? I was just wondering if this kind of level of AI response is open to the modders to mess around with?


Yes, but personally it hurts my little brain when I start thinking about those kind of details.

child of Thor is offline child of Thor
Emperor
UK
Jan 2002
time: 05:19
  Old Post 04-05-2002 21:11
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Increase Your PM Length

quote:
Originally posted by Peter Triggs
Yes, but personally it hurts my little brain when I start thinking about those kind of details.



You know, just the other day i was browsing over the forum here and i was filled with an overwhelming thought of how all you Slic guys deserve some kind of vacation.........don't want anyone to suffer burn-out or Slic melt down!
IMO there is too much good stuff that needs attention in terms of what could be done with this game, and not enough people who can actually do it! My sympathies are with you guys.
Still so you are saying it could be done right

hexagonian is offline hexagonian
King
Gnawing on your mind...
Jun 1999
time: 23:19
  Old Post 05-05-2002 04:24 Visit hexagonian's homepage!
Edit/Delete Message Reply w/Quote
#8 Report this post to a moderator
Help yourself to an AD-FREE life



This game, along with the Mods would be nothing without SLICers. All I'm doing is just compiling everything that they do into my Mod...That is why Cradle is as good as it is. You can only do so much with the text files.

ALL HAIL THE SLICers!!!!!!!!!

Dale is offline Dale
King
Sir! Why do you keep clicking on me?
Dec 2000
time: 15:19
  Old Post 06-05-2002 03:17
Edit/Delete Message Reply w/Quote
#9 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

quote:

ALL HAIL THE SLICers!!!!!!!!!


All donations gratefully received.

ANYWAYS, back on topic:

COT:
This script will deal exclusively will land and naval unit useage. Warfare basically. Also, this makes no changes to AI strategies.txt useage. So when an AI is threatened, it's strategy will change. When it builds an "attack" unit (tanks, riflemen, war walkers, etc) then the script grabs that unit. Defense units will not (pikes, mech inf, etc). So, this covers your section as the current strategies.txt in WAW covers your situation, and I'm pretty certain Cradle's does the same thing too.

Bluevoss:
Peter is working on a new diplomatic script. No need to poach ground. Plus, after writing diplomod, I'm a bit over diplomacy now.

Peter:
I've got a script in WAW that does COT's proposal already. Depending on the AI's military numbers in relation to everyone else's, it'll either build attack units, or defense units. This is controlled by strategies.txt, and the build lists. This script is what makes WAW so lethal as the AI spawns units like crazy.

child of Thor is offline child of Thor
Emperor
UK
Jan 2002
time: 05:19
  Old Post 08-05-2002 17:41
Edit/Delete Message Reply w/Quote
#10 Report this post to a moderator
Support Apolyton buy from Amazon

So Dale (if i've understood correctly!) this code includes an 'attitude' adjuster - when the AI is winning battles it builds Attacking units only ,but does it switch to a more defensive mode if it loses battles?(you seemed to say it didn't??). Anyway how do you trigger this change in AI stratagies, is just a case of putting a trigger so when a AI loses X amount of battles it re-orders it's build queues for more defensive units?Can it be coded to trigger on degrees of loss(like the example i gave in my first post)? So you get different stages to the AI's response not just on or off(all attack/all defense)? So far the attacking ability of WAW is very impressive - and i look forward to the defensive code. This will bring all the doubters back when its complete

Bluevoss is offline Bluevoss
Prince
Orlando, Florida
Dec 2000
time: 05:19
  Old Post 08-05-2002 18:02
Edit/Delete Message Reply w/Quote
#11 Report this post to a moderator
Support Apolyton, buy Civilization: The Boardgame

Pipe-dream time - how about code so that the AI will run raider units through my territory. I know that a lot of times, when I'm in a long war with the AI, I'll do a Sheridan on him, burning and pillaging all over the place. Dunno how much it helps the war effort, but it sure is fun.

Dale is offline Dale
King
Sir! Why do you keep clicking on me?
Dec 2000
time: 15:19
  Old Post 12-05-2002 18:45
Edit/Delete Message Reply w/Quote
#12 Report this post to a moderator
Update and some answers...... Enter the AD-FREE zone

You know, it's so bloody hard to beat a "naval AI" when he's got stacks of 8+ floating around! (And all his transports escorted!) I've got the naval stacking component working perfectly.

Oh, whoever asked me ages ago to look at it, sorry but there's no way to make naval units front-line or back-line in the battle screens. Well, not that I could find, and I was hunting to get my aircraft carriers away from the barrels of the enemies battleships and cruisers, while my battleships bombarded from behind.

So this project is moving slowely, but successfully.

COT:

The way the AI attack/defend build strategy in WAW works is like this:
1. The AI works out it's rank based on units per city.
2. If it ranks in the top half, there's still the top 30% threatened cities building defense units as well as the bottom 40% powerfull cities. But the top 40% production cities are building attack units.
3. If it ranks in the bottom half, the AI builds defense units in top 30% threatened, the top 40% production, and bottom 40% powerfull cities.

My theory is that if an AI has a high ratio of units per city, it has units to spare to attack (hence why I made it build attack units), while if it had a low ratio it should be preparing for defense. As it works out, the AI's hitting the high ratio marks are the militarist personalities, while the science personalities are hitting the low mark. It's logical.

Hope this clears it up. Effectively the only difference between the two build-strategies is what the top 40% production cities are doing.

Bluevoss:

You mean guerilla tactics? I was thinking of looking at guerilla warfare after I got this script finished. It could quite easily come into this script.

Bluevoss is offline Bluevoss
Prince
Orlando, Florida
Dec 2000
time: 05:19
  Old Post 12-05-2002 20:51
Edit/Delete Message Reply w/Quote
#13 Report this post to a moderator
Support Apolyton, buy Civilization 2

Something like that - not even guerilla tactics so much as raiding. There are times (sigh - lots of times) where the computer catches me short. I'll bottle up in my cities and he'll run about, not doing anything except an occasinal pillage.

Me, when I got after a city that I'm not that interested in keeping (or that I know won't go down for quite a while, the first thing is to wipe out all the tile improvements. This is where cav really comes into its true form. They can come in with a big stack, scatter and burn a bunch of holdings, and then reform into a stack at the end of a turn.

We have relatives that lived along the Ohio river. There was the story about the confederate raiders who came across the river, burned the farm (and the neighboring farms) and even stole the bread out of the over. Dunno if we can get to that level of detail, but you never know.

Hey, as a side note - has anyone ever considered sieges? If you have ZOC all the way around a city, shouldn't it be cut off from its food sources? Could this be done in the game? Right now, its rather silly that I'm blasting away at a city while herders walk their sheep right past my siege line and into the gates. Just a thot.

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:19
  Old Post 13-05-2002 01:43 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#14 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

quote:

Something like that - not even guerilla tactics so much as raiding. There are times (sigh - lots of times) where the computer catches me short. I'll bottle up in my cities and he'll run about, not doing anything except an occasinal pillage.

Is there a GOAL_PILLAGE? Probably.
Have you played Cossacks? The AI in that frequently sends a group of Cossack Raiders into your territory, captures your workers and buildings, then destroys them. It ruins the economy for a good few minutes unless you have a lot of pikemen standing around, because Cossacks are fast!.

  < Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:19.
Apolyton Time is 00:19.
    top of page
Rate This Thread:
archivepost
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.0491 seconds (91.54% PHP - 8.46% MySQL) with 31 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