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
Finaldeath
Guru
Posts: 961
Joined: Tue Mar 27, 2012 6:02 am

Re: Crusade AI Project

Post by Finaldeath »

Yeah, I'll be using it as the basis of some further research; the explore and attack group ones are immediately great - run any Japanese through Google and it all makes sense.

I keep forgetting what TLS is! I just never see it very often due to a mix of new 1.1 settings and not many AI's forward building towers!
Finaldeath

Writing a set of tutorials - My own AI is super secret development!

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 »

For UP while placing camps, you can use (up-gaia-type-count c: the-resource >= minimum-amount) to make sure your AI can see some resources...
1.0c, I got nuthin :D
Time to learn all the new things is too much so probably not scripting

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 »

which forces build to fail if the dropsite area cannot be reached ....

sometimes Ai act quite humanlike ( cannot find the appropriate dropsite) ;)
It's poison and it's blood and big fire, big burn - into the ashes and no return

User avatar
Finaldeath
Guru
Posts: 961
Joined: Tue Mar 27, 2012 6:02 am

Re: Crusade AI Project

Post by Finaldeath »

Lazarus wrote:For UP while placing camps, you can use (up-gaia-type-count c: the-resource >= minimum-amount) to make sure your AI can see some resources...
1.0c, I got nuthin :D
That check sadly is just about as useful as dropsite-min-distance. I am still a little confused as to what we can use it for, since we need to check dropsite-min-distance to check if it is an *accessible* resource (ie; not gold on an island we've scouted).

In any case with all cases early on we may scout a gold mine in the enemy base. Problem is, you:

1. Don't know how far away it is
2. Don't know how much there is (gaia type count might see other gold mines in better locations but further away)
3. Don't know if it is safe to build at (Have we tried sending a villager to the foundation site there before?)
4. Don't know if the build system will be able to place next to it (or in range of the resource max drop distance) when you issue the (build) command
5. Don't know the direction of the resource (actually more important for earlier drop sites)

I don't even think sn-minimum-dropsite-buffer works which might solve this a bit; the build system *appears* (and I still need to test this more) to place a camp in an arbitrary location if it can't find the resource the building is attached to. The odd thing is it isn't even governed by maximum town size or anything else so they start being put everywhere wasting tons of time, resources and whatever.

It'd be best solved with perhaps a "build-test-foundation" function that allows the game to plan a location to build a building in, which can be checked next pass on if it is a good one (seeing some of the info from above would help!), or just some control as I said over the locations it must be forced to be in (must be within X of a resource specified, must be within X of the home base, must be away from X tiles from the nearest or specific enemy, etc).
Finaldeath

Writing a set of tutorials - My own AI is super secret development!

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

Re: Crusade AI Project

Post by Campeador »

It seems that my mining camp spamming is smaller with the new timer. After that this I suffered other problem with the lack of lumber camps in the late game, causing no villagers cutting wood. It was a problem with drop-distance sns that I think it's also resolved. Next problem was a lack of wood in late castle age, so I thought that it was the same problem, but it was only a funny thing:
In 1.c you only can build a single farm at once, but you can build more in UP, so you need more wood. So It was only a thing to modify gatherer-percentages for UP.

My current problem is that my 4.6 version stops military production in late feudal under specific situations. It improves my castle times and it's nice against most opponents. But sometimes it results bad. For example in my last test, two crusades 4.6 were winning two crusades 4.41 (only for a small margin, with the advantage existed), until both prepared their castle times, moment used by two 4.41 to take military advantage, take the initiative, and get a slow win, but a win.

But I'm too tired to experiment things and this change is good in most cases. Sometimes even not too bad against 4.41. So I'll test it a few more times, but without change this code... for the moment.

Your discussion about camps is still interesting, anyway. I'll have to see this Bari's guide.

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 »

spamming usually occurs if you loop a camp placing rule and ~ camp-max-distance is too low, but rests of a pile are inside
or not the whole pile is inside camp-max-distance or in UP the sn-camp-max-dist is less than the specific settings possible there
in 1.0c a destroyed camp won't be replaced at the same place triggering res-found but not placing to that (close) pile
On Arabia I set a fix camp-max distance and enlarge it independend of the result of res-found, full size in combat anyway
It's poison and it's blood and big fire, big burn - into the ashes and no return

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

Re: Crusade AI Project

Post by Archon »

Crusade is a good 1.0c script, but it doesn't seem to make good use of UP possibilities besides hunting boar. In particular Crusade's flush suffers from never retreating out of town center.

Crusade's fast castle age strategy on black forest needs much work. It had a too big town size with walls with only a few gates it caused it's villagers to walk over half the map to build something on the outside of his wall on a side without a gate. Also it seems to lack any strategy, as it doesn't train enough units to rush, but no additional town centers for booming either.

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

Re: Crusade AI Project

Post by Campeador »

I'm adding a little of UP stuff, like war boats garrioned if losing, etc. But it's evident that my delayment compared with other AIs has becomen too big.

Black Forest. I build my walls at perimeter 2, and with a smaller TS is not too strange to don't find enough space for buildings in a so closed map. The only solutions that I can imagine are:
- Remove my wall, but IMO without walls Black Forest shouldn't be played so different to Arabia
- Optimize my building placement. Mine is acceptable for most maps, I know that it could be much better but I needed a lot of effort to make it and I know that I'd need a higher effort to improve it.

About my strategy, it's the same than for Arabia in the castle and imperial ages. I watched that a flush against a walled opponent is <_< so I only replaced it. The same strategy works ok in Arabia because when I reach to castle I've got many more villagers, so I can train more soldiers. So for the moment my AI is quite optimized for open maps (my favourite) and acceptable for closed ones and water. I'll improve them (for example my next version is stronger in water) but I need time to get it.

Anyway, I've watched that to stop military in late feudal can be dangerous against crazy opponents like Crusade 4.41, so I'll add retreating and garrisoning (in land) to survive until get a decent defensive army.

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 added more changes, mainly UP stuff. The AI is better in a few aspects, but it's evident that worse in others because my old 4.41 always defeats 4.6 in 2v2 (only sometimes in 1v1).

I'm sure that one of the reasons is that my battle behavior is not good for 2v2, my troops often change from attack an enemy in his base to defend my ally in him or viceversa. There are more possible reasons and I'm testing it heavily to discover them. I want to improve my AI before the launch of Forgotten Empires (26-28th December).

Could anyone test this version to find things to improve? It's normal to lose against other top AIs but not ALWAYS against an older version of my own script. Of course, if I say this is because I'm also testing it, experimenting new values, etc. But perhaps another person's point of view could find something that I don't.

About my new team coordination. If Crusade receives an ally's request to help in attack/defense it does it. With UP it also counts team military superiority (instead of individual) to consider if attack or not.

_II2N_
Guru
Posts: 639
Joined: Thu Jul 14, 2011 8:44 am

Re: Crusade AI Project

Post by _II2N_ »

Try sn-target-player-number?

Post Reply