myAi

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
the1unknown
Yogi
Posts: 344
Joined: Sat Jul 21, 2018 3:27 am

Re: myAi

Post by the1unknown »

thanks scripter, i will take a look on how my ai will perform now

maybe a strategy would be to wall, lock gates, boom, make skirms/archers/mongonels and sit close to walls
got to imp -> open gates- >play
"you don't have to be great to start, but you have to start to be great" -the villager

User avatar
LightTree
Waheguru
Posts: 1608
Joined: Wed Mar 10, 2010 12:21 am

Re: myAi

Post by LightTree »

How I miss that style of play (aka the human player that used to play like that) :( :(.

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

Re: myAi

Post by scripter64 »

Would that person like 8+ layer walls and mini-towns across the map? :')

User avatar
the1unknown
Yogi
Posts: 344
Joined: Sat Jul 21, 2018 3:27 am

Re: myAi

Post by the1unknown »

I see if the ai loses most of his base and if ai will relocate his town center, it will keep walling his old base if part of the walls were broken.

going with scripter's idea, would be interesting to see ai making multiple town centers across the map and walling each base.

more even interesting would be walling with many layers of wall . Is this connected to town-size ?

I have done some experiments on your childrens and I saw pharaon walling with 2 layers, but with few tiles distance between them

https://ibb.co/R6bPhgY

PS: no one was hurt during this experiment!
"you don't have to be great to start, but you have to start to be great" -the villager

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

Re: myAi

Post by scripter64 »

The walls placed by the original "build-wall" commands are precalculated as the game starts, so they won't adapt to new town positions later on. The "up-build-line" command can be used to place custom walls (and other buildings) at specific positions on the map.

User avatar
the1unknown
Yogi
Posts: 344
Joined: Sat Jul 21, 2018 3:27 am

Re: myAi

Post by the1unknown »

I understand. So this is how ulysses managed to do that forward wall

I posted few months ago a pic with uly doing some forward random 1 tile wall in my base

Any ideas why pharaon made 2 lines of walls ?

one was set in dark age and second one was started in feudal. Is the only ai that made walls(palisade walls) in dark age, other ai wound't do palisade walls in dark age
"you don't have to be great to start, but you have to start to be great" -the villager

User avatar
the1unknown
Yogi
Posts: 344
Joined: Sat Jul 21, 2018 3:27 am

Re: myAi

Post by the1unknown »

is there a command for enemy-found ?

For my DM Ai I first used the

Code: Select all

(defrule (true)
=> (attack-now) )
But it seems that military units start to freeze and move back and forth 2-4 tiles until my ai found enemy base/enemy units.

( I hope is not other script that causing the freeze problem)

If there's no code for enemy-found , then I will add

Code: Select all

(defrule (players-building-type-count any-enemy house> 0)
barrack , stable, archery, lumbercamp , tc and so on
=> (attack-now) )


(defrule	(players-unit-type-count any-enemy villager> 0)
	eagle, monk, UU, scoutline and so on
	=> (attack-now
"you don't have to be great to start, but you have to start to be great" -the villager

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

Re: myAi

Post by Promiskuitiv »

You should be able to use players-building-count any-enemy >= 1 and for attack groups / attack now also players-unit-count any-enemy >= 1. Replace any-enemy by target-player in case you use sn-target-player-number for that purpose already. :)

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

Re: myAi

Post by ER »

And try not to use attack-now on every rules pass, it is very expensive on processor time. Consider using a timer or something to add a delay between each attack now.

This might be improved on UP, but before that in 1.0(c) you could literally beat other AIs by spamming attack-nows as it chowed all the processor time as it is an asynchronous operation, leaving not much processor time for the enemy. It also led to very jerky movement, etc.

Until you get more used to other methods of attack, I guess you could still use attack-now.
Stephen Hawking held a party for time travelers.
He sent the invitation out the day after. Nobody attended.

Ah coffee. The sweet balm by which we shall accomplish today's tasks. ~ Holly Black

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

Re: myAi

Post by scripter64 »

Yes, in addition to what ER said, attack-now flood can cause your own units to rapid retask, which may lead to them becoming unable to actually hit even nearby targets properly in some cases.

Post Reply