Crusade AI Project

Upload your latest creations here.
Please note that by posting comments to posts in this forum you forfeit your personal copyright on whatever you post. AI Scripters reserves the right to re-use objective comments in script reviews without requiring the posting author's permission. Credit, where appropriate will be given in such cases.
Post Reply
User avatar
Campeador
Waheguru
Posts: 1340
Joined: Mon Nov 01, 2010 8:11 am
Location: Spain

Re: Crusade AI Project

Post by Campeador »

What's the exact name of this map? Crusade always trains a navy in the standard Rivers map. For the moment the rules that I stole to ATE to detect the type of map counting fish seemed to work.

Trading. What things do you think that I should improve? Train trade carts earlier or only more?

About the excessive number of gold camps, I also see them seldom, but it's strange, because I add (dropsite-min-distance gold/stone < 255) in all my mining camp rules. I also add the desire of a minimal distance, except to set a minimum number of 4 camps if there are dead gold miners.

User avatar
Lazarus
Guru
Posts: 555
Joined: Sun Jan 22, 2012 12:02 pm
Location: Someplace in the United States

Re: Crusade AI Project

Post by Lazarus »

I believe they are talking about this: http://forums.aiscripters.com/viewtopic.php?f=8&t=2809
Time to learn all the new things is too much so probably not scripting

User avatar
UnfairestEel
Waheguru
Posts: 1835
Joined: Sat Jul 30, 2011 4:31 pm

Re: Crusade AI Project

Post by UnfairestEel »

Campeador, This AI attacks too late.
The best way for a flush to beat a FC is by attacking and disrupting the enemies economy before they even have an army.

Crusade has no trouble building a large army very quickly but refuses to attack an unguarded enemy for far too long: resulting in defeat. :(

IS_Machine has similar issues too actually.
Knowledge is Time.
This simple fact can be derived from these beliefs:
Time is Money.
Money is Power.
Knowledge is Power.
Therefore, Knowledge is Time.
Q.E.D.

User avatar
THE RULER
Guru
Posts: 655
Joined: Sat Feb 20, 2010 10:55 am
Location: FRG
Contact:

Re: Crusade AI Project

Post by THE RULER »

going to examine UP coding in a 1st step and searching for code in your script I found boar hunting rather only.
more coding I found so far only in ND's "freezer" but only to get enemy information
hmm !?
It's poison and it's blood and big fire, big burn - into the ashes and no return

User avatar
Campeador
Waheguru
Posts: 1340
Joined: Mon Nov 01, 2010 8:11 am
Location: Spain

Re: Crusade AI Project

Post by Campeador »

If you mean 4.41 version, the UP stuff is:
- Boar hunting. Not a very effective one yet.
- sn-maximum attack-towers in the Battle Behavior file, to prevent possible TLS
- sn-allow-civilian defense in the same file, for villager rush
- It can force more than a single villager to construct specific buildings in UP Initialization

I recognize that it's a script more focused in 1.c. :lol: Anyway you can find a few more things in 4.51:
- An improved boat hunting.
- It can make two or more buildings at once, it's the reason because I use alternative building files like Buildings Alpha etc for UP or 1.c, Camp sites also for both, etc.
- +200 pop really allowed again.
- Alternative dark gatherer percentages for 1.c and UP because boars reduce the needing of farms.
- sn-enable-training-queue to train consecutive villagers in dark age (I need to think a little to allow it in later ages). In UP Initialization.
- Force drop code, but not sure about if i'ts effective.
- Better dock placement.
- Garrison boats in defense.

But again my main changes work for 1.c (which means also for UP).


About my new IDs. I've finally used only a few of them. I thought that I was going to need the rest, but only thought. Anyway, I could need them in a future so I'm not writting twice something that I've made already. If you are interested in any specific or in which I've used tell it.

User avatar
THE RULER
Guru
Posts: 655
Joined: Sat Feb 20, 2010 10:55 am
Location: FRG
Contact:

Re: Crusade AI Project

Post by THE RULER »

Any code you've worked out I'd appreciate if you share it with me.
It's poison and it's blood and big fire, big burn - into the ashes and no return

User avatar
Campeador
Waheguru
Posts: 1340
Joined: Mon Nov 01, 2010 8:11 am
Location: Spain

Re: Crusade AI Project

Post by Campeador »

Ok, download my version 4.51, it's still unofficial, but you'll find useful stuff in it.

a) File UP Initialization. You can find here:

- (set-strategic-number sn-enable-new-building-system 1)
It's very dangerous for RM if you don't add anything more, even for DM you need caution. It's because you sometimes prefer to avoid two consecutive buildings of the same type. I don't care for my feudal buildings, because in the few cases in which I build more than one building of the same type I make them consecutive, but for Buildings Zero, Betha and Omega files I've got two versions, for 1.c and UP. They are the same, but adding the up-pending-objects condition to have the diversity of buildings that I want. My houses also change their rules (early General Economy file and Buildings Zero). And I also reduce change the requirements for farms for UP because you can build them faster, so they need a smaller excedent (General Economy).

- up-assign-builders. There are buildings that need to be built faster than others.

- Dock placement. sn-dock-avoidance-factor and sn-dock-proximity-factor help to build your docks nearer each other when you need it or far in later game.

- sn-enable-training-queue. It's always one for Post-Imperial starts, you have completed all your desired techs. For other initial age starts it's one for most dark age, because otherwise your villagers will need 26-27'' to be trained instead of 25''.

- Force drop. I took it from The Horde and adapted to my AI. It sometimes seems not to work for me, so I suggest you to study it from The Horde, perhaps from Chameleon.

- Garrison war boats. If the sum of enemy war boats is higher than my allies and mine, and I've got less than 10 war boats, I garrison mine in docks to don't suicide them 1 by 1. It works, and in the real life it's better than nothing, but perhaps you'll find a better algorithm. I'm 99% sure that it exists.


b) Boar Hunting file. Not boat hunting as I said in my last post. :lol: Based in The Horde, but adapted to my own build order and ideas. It works much better than the boar hunting of my official 4.41 version, it even works well. :lol:

c) Battle Behavior file:
- sn-maximum attack-towers against TLS in UP. sn-allow-civilian-defense for the same in 1.c
- sn-allow-civilian for Spanish villager rushes.

d) Gather Percentages Dark Age. It has two files, for UP and for 1.c. UP sends less dark woodcutters.



New stuff not specifically designed for UP:
a) Attack rules is almost the same file, and it's to decide if attack or not. Attack Evolution combines TSA with attack-groups, I'm changing it constantly so I don't remember if it combines them never, sometimes or always. But you can see the evolution of it in my code. If Crusade decides to combine both methods:
- Big groups (20 men) until 10'' later or until it finds enemy's base. Duck taught me to detect it with the increment of their sight units or the decrement of my own. I'm adding enemy's projectiles.
- Disgroup, to allow new group sizes. So attack-groups sns set to zero for 2''.
- One man groups. Big groups march better, one-man fight better. If I haven't added any "#load-if-defined x" in the first rules you'll see that after 60''
these one-man groups are dismantled again, to allow monks to gather relics. But I'll add an alternative rule in the end to make that G-ATTACK-PHASE set to GV-ATTACK-PHASE-3 uses 20-men groups anyway in island maps, because transport ships carrying a single unit per trip... <_<

b) Much different Army Slection file. Many less rules for it, and Crusade often trains less types of units, allowing to upgrade the selected units faster. It sometimes avoid counter units when enemy has got enough anticounterunits.

c) More changes and more almost unknown old but interesting stuff. Do you want anything more? Any doubt?

User avatar
THE RULER
Guru
Posts: 655
Joined: Sat Feb 20, 2010 10:55 am
Location: FRG
Contact:

Re: Crusade AI Project

Post by THE RULER »

it's the first time I installed UP and set a game up today

I added The Horde's boar hunting stuff to Quetzalcoatl and tested it vs Horde (teuts) to see if that works same

At hell that stuff is diabolic fast lol

I'll convert some code step by step, first reduce code, then optimate camp placements

happy UP scripting
It's poison and it's blood and big fire, big burn - into the ashes and no return

User avatar
Promiskuitiv
Waheguru
Posts: 1364
Joined: Thu Nov 10, 2011 1:07 pm

Re: Crusade AI Project

Post by Promiskuitiv »

Nice to see you scripting again ruler and great work with the update campi! :)

User avatar
kram1138
Guru
Posts: 815
Joined: Sun Jun 26, 2011 11:54 am
Location: Winnipeg, Canada

Re: Crusade AI Project

Post by kram1138 »

THE RULER wrote:it's the first time I installed UP and set a game up today

I added The Horde's boar hunting stuff to Quetzalcoatl and tested it vs Horde (teuts) to see if that works same

At hell that stuff is diabolic fast lol

I'll convert some code step by step, first reduce code, then optimate camp placements

happy UP scripting
Yay! The first time i used UP i also was amazed.
PostCount.Add(1);

Post Reply