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.
User avatar
Campeador
Waheguru
Posts: 1340
Joined: Mon Nov 01, 2010 8:11 am
Location: Spain

Re: Crusade AI Project

Post by Campeador »

Crusade chooses a default flush in the beginning of the game, but it can change the unit selection, or even the whole strategy later. It's because the message says "Default Strategy" instead of only "Strategy".

I know that Crusade is too bullheaded with its flushes, training soldiers to persistently before to jump to castle. Crusade 4.6 does it better in some circumstances, but it has too many other difficulties, so 4.42 is my official version, which it's only 4.41 with more UP stuff and a few bugs corrected.. So I'll have too work more in that.

I plan a new AI, completely designed for UP. If anyone want to play 1.c will have to play current Crusade. For the moment I've studied most of the code of The Horde, I'm studying Barbarian and I'll take a look also to UnfaireSteel, Chameleon, MEW and some others. Crusade's structure is not enough for I want, so I?ll start my new script from a blank file. Of course Copy+Paste from old Crusade will save me a lot of work, but I'll only do it knowing what I'm copying and being sure thatit's what I want in my new AI.

Ok, I'll add more resign rules. :rolleyes:

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 »

with UP krush is the flusher's doom, esp with huns or franks :(
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 »

I disagree. UP has improved FCs, but IMHO it has improved flushes even more.

In the game that I've lost vs Barbarian, Crusade used a pure TSA which sent its units into enemy's tower instead to annoy enemy's villagers. But watching games of The Horde and Barbarian I've watched that perhaps this problem could be resolved combining att-groups with retreat-now once TC fire detected. I also need a more intelligent army selection, because as Alevo says, archers are a waste vs a pure cavalry enemy army.

Of course FCs have role even in open land maps, although IMHO they are for pockets in team games.

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 »

try a flush vs unfairesteel (3.8) huns 1v1 of course
you can go 16+ castle age and asap place 2 TCs - even under attack in 30 min you have min 30 villagers more, rams, knights or bodkin ha ! gg for your lousy feudal army
with that multiple and accelerated building the boomer is :dance
I remembered that old times when Kamikaze met Vaisravana - once he managed to get the 2nd TC up ....
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 »

I've made a few tests Crusade vs UnfaireSteel Hun:
- Mongols. Crusade wins, but because it was a scouts/archers flush vs a CA rush, not a krush.
- Vikings. Crusade loses, but feudaling at 14-15' because very bad luck with sheep.
- Magyars. Crusade loses with the same mistakes than vs Barbarian. Archers should be stopped vs knights. Also the defensive tower was quite annoying, so I'll have to see if there is a possible UP stuff to resolve it.
- Goths. Crusade wins. It used wrong archers, but Crusade was still very lucky because its TSA found the enemy gold mine, the best possible target vs a krusher. No gold only limited knights at the begining and anyone later.

Always speaking about 1v1 open land maps. In top human games flushes (or drushes followed by a flush or a FC) are better than FC. For average level and below humans, flushes are even to FC. Of course, it doesn't matter in which category they are, if a human is clearly better than the other its strategy will win, it doesn't matter if it's a flush or FC, so in my other sentences I mean even opponents.

The best AIs are equivalent to average players, or even slightly below average, although after the FE game, some human players are amazed about the new AIs, mainly Barbarian, although also The Horde. Before UP flushes weren't better for AIs than FCs because:
- FCs are more robust strategies, less dependant about luck (sheep, hunt and exploration).
- AIs were slow, and speed, being important for FCs, it's more critical for flushes. A solid FC in 18:30 instead of 14:30 is bad, a solid flush in 14' instead of 10' is horrible.
- AIs had a worse micro, so they suffered even more with enemy's TC fire. And it's more problematic for feudal units than for knigths or even feudal units with castle upgrades.


But UP has reduced a lot these problems, so FCs are now better for AIs, but flushes much better. Of course, AIs can't perform like top players, so FCs will have always a place for AIs even in Arabia 1v1.

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 »

Also the defensive tower was quite annoying, :devil
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 »

Miniupdate: Crusade 4.42a launched.

The only change is to set sn-enable-patrol-attack to 1. So you'll understand why I haven't dared to call it 4.47 or alike. :P

I'd like to reduce the number of dark age farms, but it requires more work. I don't know yet if I'll create a new update for Crusade or if I'll only change it for my future AI.

scripter64
Waheguru
Posts: 5891
Joined: Fri Jan 16, 2009 8:36 pm

Re: Crusade AI Project

Post by scripter64 »

Thanks, Campeador :)

Archon
Waheguru
Posts: 1905
Joined: Sat Nov 08, 2003 9:22 am

Re: Crusade AI Project

Post by Archon »

I think Crusade should use a timer to control it's force food drop code, so it would only drop food when the current villager is about to be finished.

User avatar
Alevo1
Guru
Posts: 835
Joined: Thu Aug 04, 2011 10:10 am
Location: England

Re: Crusade AI Project

Post by Alevo1 »

Archon wrote:I think Crusade should use a timer to control it's force food drop code, so it would only drop food when the current villager is about to be finished.
Use this if you want, seems very reliable:

Code: Select all

(defrule
 (current-age == dark-age)
=>
 (up-get-fact unit-type-count villager math1)
 (up-get-fact unit-type-count-total villager dropcheck)
 (up-modify-goal dropcheck g:- math1)
; (up-chat-data-to-self "Current queued villagers: %d" g: dropcheck)
)

(defrule
 (or(timer-triggered food-timer1)
    (timer-triggered food-timer2))
 (up-compare-goal dropcheck c:= 1)
 (food-amount < 50)
=>
 (disable-timer food-timer1)
 (disable-timer food-timer2)
 (up-drop-resources food c: 5)
)

Post Reply