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
MuRRay Jnr
Waheguru
Posts: 1990
Joined: Mon Jul 27, 2009 3:03 am
Location: Queensland, Australia

Re: Crusade AI Project

Post by MuRRay Jnr »

P.D: If a make mistakes with my English, no doubt in correct me, as with my scripting skill. I need it.
i have french friend learning english and she gets me to help her with her english tutor homework. it makes me lol when im trying to explain a language to someone when the language breaks all its own rules all the time.
I want first test Crusade vs a KLEW AI,
this is going to sound really newbie but can someone please give me a rundown of what a KLEW is.

Another decision is about loom rule.
the way i do it is something like
(defrule
(or(not(can-train villager))
(unit-type-count villager >= 16))
(can-research ri-loom)
=>
(research ri-loom)
)

this is so loom will be researched before the hunt phase no matter what so i have no tc-idle time and very very rarely lose villagers to wolves.
cheers,
murrayj

my current attempt at scripting, avarice ai

User avatar
jdstankosky
Guru
Posts: 911
Joined: Thu Nov 25, 2010 12:30 pm
Location: Florida, USA
Contact:

Re: Crusade AI Project

Post by jdstankosky »

KLEW stands for Kidd's Lightning Eagle Warrior. It's by Mike Kidd, aka Lord_Captn_Kidd, and it's it's basically arriving in castle before 14:00 with Mayans and building EW and terrorizing the enemy while you boom at home base.
From Google Search that brought up an AoKH page.
http://aok.heavengames.com/cgi-bin/aokc ... 28794,0,10
Do not try to script a counter for everything. That is reactionary, and always slower than taking the initiative in battle. Decide from the start what you are going to do, and do not waiver from it. Own it.

User avatar
Leif Ericson
Waheguru
Posts: 1423
Joined: Wed Dec 09, 2009 8:15 pm
Location: United States

Re: Crusade AI Project

Post by Leif Ericson »

KLEW stands for Kidd's Lightning Eagle Warrior. It's by Mike Kidd, aka Lord_Captn_Kidd, and it's it's basically arriving in castle before 14:00 with Mayans and building EW and terrorizing the enemy while you boom at home base.
Hmm. We usually just call them eagle warrior rushes here. :) The difference is that they advance to the Castle age at 17 or 18 min. For your scripting level, Random-Task might be your best bet. There's a link to it at the AI Scripting Ladder page.

User avatar
ER
Waheguru
Posts: 2764
Joined: Sat Nov 08, 2003 9:23 am
Location: Johannesburg, South Africa

Re: Crusade AI Project

Post by ER »

The closest ai to a genuine KLEW was Torisan by Coteti imho. About 16 1/2 minutes to castle, and very soon after that about 4 eagles and 2 pikes in your base. A wonderful ai, once again imho.

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

Re: Crusade AI Project

Post by Campeador »

More results:

- ARFFI (aztec). Crusades has got a greater feudal army, but no so to dare to attack. ARFII, having enough feudal defensive troops advances faster to Castle and attack with eagles, but mixed with archers, monks, and perhaps a few spears. A more powerful, well combined army and with a more intelligent behavior (I need set a few SN's). My troops die with honor, but when they are all dead, Crusade sends substitutes one ny one to repel, and make laugh the invasor horde.

- Kamikaze (viking). Both AI's flush, at first Crusade seems slightly stronger, but the game is even, everything is possible. Kamikaze builds a few towers, getting a clear advantage over a weaker enemy, but the game is not finished yet. It is when Kamikaze arrives to castle, not knights but fast-atacking long sword and samurais, supported by another units. Crusade still needs a few vitamines to win this good flusher.

- Kosmos. This AI feudals quite faster than Crusade, but both create first soldier at the same time. Of course both flush, but Kosmos better. One reason is its better SN's and troop behavior, another its better economical balancing, there are more, but my experience only let me know that they exist. And yes, you guessed, Kosmos also advance to castle much faster, as everybody.

- CPS_Alexander. An even fighting in feudal. Alexander gets Castle Age faster and wins. Crusade also castles and fall with dignity, bad consolation for its villagers' widows.

Later I add a little but not minor change. A few market rules to get castle age faster and improve feudal economy.

- CPS_Alexander again. Feudal fight, Alexander castles faster again, but... Crusades castles at time to not getting behind. Even Castle Age fighting. Well, Alexander a little better and arrives to imperial faster, but Crusades also imperials and arrive to 195-pop. After a hard fighting CPS_Alexander wins again.

- Demon (random=celts). Crusade flushes, Demon is caught defendless. Its town center is destroyed by feudal troops, as most of its villagers. Crusades arrives to castle faster, a historical fact, and only because its enemy doesn't. The new Demon's town center is discovered after by the scout, with about 30 villagers, getting destroyed also mercyfully.

- Demon (aztecs). Crusades flushes, any surprise? But Demon plays aztecs very well, repeling the attack while it castles. Crusade is going replenishing it's losses and castling also, but it's behind, so it doesn't dare to attack again. Demon gets every relics and it's holdong them by 200 years when it's nearing to Crusade base with very bad intention. Obviously it has reached 200-pop.


Conclusions:
Crusade is enough strong to molest good AI's, but only can defeat them when they are specialized in one civ and plays with a very different one. AT least with your advices and my test I know a few improvements to make.


P.D: Leif, the Random-Task link in AoKH doesn't work well, and I haven't found it at aiscripters.com. Do you know another one? At the moment I can test with Torisan, but the other is also interesting.
Last edited by Campeador on Fri Dec 17, 2010 10:17 am, edited 1 time in total.

User avatar
jdstankosky
Guru
Posts: 911
Joined: Thu Nov 25, 2010 12:30 pm
Location: Florida, USA
Contact:

Re: Crusade AI Project

Post by jdstankosky »

It definitely sounds like you're making excellent progress! I can't wait until you think it's ready enough to compete in the 2v2 tournament with MY newbie script! It will make for a fresh and exciting competition from all these guys who have been here for a long time already.
:dance
Do not try to script a counter for everything. That is reactionary, and always slower than taking the initiative in battle. Decide from the start what you are going to do, and do not waiver from it. Own it.

User avatar
marathon
Waheguru
Posts: 1984
Joined: Fri May 14, 2010 2:30 pm

Re: Crusade AI Project

Post by marathon »

I've never beaten Degel. Not even close. Degel is weak with all other civs, except maybe Byzantines. It's an Aztec script.

Good to see that you are making progress. It's all about fun, and having a good fight with Alexander is fun.

Test against diabolical Solidus. I always test against it every time I change my script. Also Vaisravana is a very good script, test against it when you have balanced it a little more. Finally, test against ATE from time to time. I still remember my first victory against this classic script :)

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

Re: Crusade AI Project

Post by Campeador »

Hi Jdstankosky! I have no problem to compete teaming with you, but one question. To participate in AI tournaments, is it enough with uploading your AI, or you have to play online with your AI? In any case I'm going to download your AI to play it versus my next Crusade update. I'll comunicate the result and upload next Crusade skeleton. Result in next days:

Of course, later I'll add to my AI a train trade-cart and perhaps a few team-chating rules to coordinate attacks. Let's go and :shoot together the most veteran and powerfull AI's. :P

Marathon, the one that I've beaten it's Demon , not De'Gel. It plays non-aztec only since last update, and manage them well, but not as ARFII, although with aztecs is can beat ARFII.

The ARFII version that has beaten Crusade is ARFFI_05_Eyries ver1.09, with only 50 rules (but what very long and powerful rules :o ). In one test of mine, a few months ago it defeated De'Gel, but I know that one game is not enough to judge two AI's so my question is, which version is more powerful usually?

Another thing. Your wood buffer is a good idea, but it can wait (as other good ideas that tell me other scripters) because when my army has those archers it has always enough wood to doesn't need that buffer, perhaps when I balance a little more my economy and don't take a little excessing wood and perhaps lacking a bit of food and gold. But it has given me an idea about different buff to create feudal trash when I have too little gold.

P.D: Jdstankosky, congratulations for winning to the Horde. :blink: After that, the sky is the limit! B)

User avatar
marathon
Waheguru
Posts: 1984
Joined: Fri May 14, 2010 2:30 pm

Re: Crusade AI Project

Post by marathon »

Wood buffer is important when you need more farms. It is not important early when you can easily feed your army with less than 20 farms, but later, especially in mid castle age and in imperial age. That's why I suggested to add the buffer for later archers.
Reason: you can not have more than 32-35 farms in feudal because you can only build one at a time. When you need more farms you really can't afford delaying your farm dropping, so try to always have 60 wood for your next farm. You will see what I mean when you try to have 60 farms for your champions.
You could add buffers for other things too, but unit training is very important because it happens all the time. It's not like a barracks that delays your next farm for 10''. How many barracks will you build? Not more than 10. How many archers? Maybe more than 100. How many skirms? I have trained more than 1000 skirms in a 2h game. Without wood buffers I wouldn't survive long enough to see all of them die.

I know that you've beaten demon, not an arffi script. I just consider Degel too strong even for testing against. You may never beat it. It has several strategies and it often switches from one strategy to another according to the flow of the game. See the last Ladder game against Eagles Revenge: a very clear victory against a script that was undefeated until then, against a script that won all 7 games in less than 40'.
To participate in AI tournaments, is it enough with uploading your AI, or you have to play online with your AI?
Just read a tournament's rules and upload accordingly. Matches aren't played online: a judge announces that he starts a game, then he plays the game on his computer and then he provides the record and a review. All you have to do is participate and submit your file. It seems that you are ready.

User avatar
jdstankosky
Guru
Posts: 911
Joined: Thu Nov 25, 2010 12:30 pm
Location: Florida, USA
Contact:

Re: Crusade AI Project

Post by jdstankosky »

Please do NOT overlook the food and wood buffers!

That was one of the most helpful things that I did to my script after receiving the same advice. I now have a buffer for ALL units, buildings, researches, etc to compensate for training villagers and planting farms.

Example:

Say that spearman-line costs 35F and 25W

We would need to buffer for villagers (50F) and farms (60W)

It would look like this:

(defrule
(food-amount > 85) ; You must add the buffer onto the unit cost or you still interrupt training villagers.
(wood-amount > 85) ; Same with farms!
(unit-type-count-total spearman-line < ##)
(can-train spearman-line)
=>
(train spearman-line)
)


This will help your economy very very very much!
Do not try to script a counter for everything. That is reactionary, and always slower than taking the initiative in battle. Decide from the start what you are going to do, and do not waiver from it. Own it.

Post Reply