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 »

scripter64 wrote:Forwarded your message :)

:lol: :lol:
"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 »

realising that after the update it perform worst 11
Image

getting beated by training4 (only M@A strategy)



still, look how smart it plays. it make the enemy follow his one vill far away from his town center

Image

:lol:
"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 »

That villager learned to lure more things than boars :devil

User avatar
Esty
Guru
Posts: 929
Joined: Wed Dec 30, 2015 7:37 am

Re: myAi

Post by Esty »

Hey the1unknown,
Can you confirm me that you want one of ur AIs to join the next Davis cup ? In that case, can you give me his name plz ? I'm typing a list of AIs taking part ;)
Author of the TRiBaL_Warriors AI and currently PharaoN :dance

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

Re: myAi

Post by the1unknown »

Esty wrote:Hey the1unknown,
Can you confirm me that you want one of ur AIs to join the next Davis cup ? In that case, can you give me his name plz ? I'm typing a list of AIs taking part ;)
but all my ai are so bad

lol

even if I put 2 of them in the same team vs 1 ai..still they will lose :lol:


i don't know what to say, would be awesome to see my ai in an tournament
"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 »

Question

is the code

Code: Select all

(defrule (unit-type-count-total my-unique-unit-line < 50) (can-train my-unique-unit-line)
=> (train my-unique-unit-line) )
harder for the game to read than the

Code: Select all

(defrule
	(true)
=>	(set-strategic-number sn-coop-share-attacking 1)
	(set-strategic-number sn-coop-share-information 1)
	(enable-wall-placement 1)
	(disable-self)
	)
?

i am referring to to the structure of the code, the lines
"you don't have to be great to start, but you have to start to be great" -the villager

User avatar
Aleph
Yogi
Posts: 476
Joined: Sat Jan 17, 2015 10:07 am
Location: Germany

Re: myAi

Post by Aleph »

It makes no difference to the game... Definitely harder to read for yourself any time you wanna work on it.

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

Re: myAi

Post by the1unknown »

Aleph wrote:It makes no difference to the game... Definitely harder to read for yourself any time you wanna work on it.
thanks. For me it seems to be more easy to read with long lines
"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 »

it is possible for the ai to lock the gates ?

https://ibb.co/Bnrvfxb

everything was well until some units opened the game and let 30 military units into his base
"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 »

It's possible using DUC by finding your unlocked gates and using "up-target-point" with "action-lock". This action is a toggle, so it's important to filter out locked gates by checking "object-data-locked" first. To ensure there's no weirdness with lock/unlock looping in multiplayer delay, it would be good to not flood these rules every pass and instead run them for certain events or on like a 10 second timer. Please be careful with locking gates, though, as you may get into situations where you have no building room left inside, etc.

Code: Select all

(defconst gl-local-total 100)
(defconst gl-local-last 101)
(defconst gl-remote-total 102)
(defconst gl-remote-last 103)
(defconst tm-gate-lock 40)

(defrule
	(up-timer-status tm-gate-lock != timer-running)
=>
	(up-full-reset-search) ;clear all existing search results
	(up-find-local c: gate-class c: 40) ;find up to 40 of your own gates
	(up-remove-objects search-local object-data-locked != 0) ;filter out the locked gates
	(up-get-search-state gl-local-total) ;get the remaining unlocked gate count
)
(defrule
	(up-timer-status tm-gate-lock != timer-running)
	(up-compare-goal gl-local-total > 0) ;if there are unlocked gates remaining
=>
	(chat-to-player my-player-number "Locking gates.")
	(up-target-point 0 action-lock -1 -1) ;lock them
)
(defrule
	(up-timer-status tm-gate-lock != timer-running)
=>
	(enable-timer tm-gate-lock 10) ;reset timer for another 10 seconds
)

Post Reply