BruteForce AI

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
TheLightEmpire1
Forumer
Posts: 4
Joined: Sun Dec 13, 2015 7:42 am

Re: BruteForce AI

Post by TheLightEmpire1 »

Toast, here is a bug or some bugs, when the boar is outside of arena walls, it doesn't delete one wall, so the boar dies outside, will delay brute quite a lot with the walking vills. And adds tc's way too late which will delay boom and imp time. Other than that, everything else seems okayish :P

User avatar
CheeseOnToast
Yogi
Posts: 388
Joined: Sun Aug 31, 2014 5:48 pm

Re: BruteForce AI

Post by CheeseOnToast »

Not sure how to really do the wall delete thing for boars, (still a UserPatch script kiddie) but I'm sure if I s̶t̶e̶a̶l̶ browse about I will find something to work with. :devil
Will look into improving Arena some more.

User avatar
Esty
Waheguru
Posts: 1159
Joined: Wed Dec 30, 2015 7:37 am

Re: BruteForce AI

Post by Esty »

Hello, I am new scriptor, working hard to try to understand all those scaring codes.
But i am improving step by step thanx to this great website.

I read in your update 2-10-3c that u made your AI (bruteforce) able to place his mining-camp where you want him to build :

Fixed a bug where BruteForce sometimes places its first mining camp for gold on stone.

Actually i have the same problem ; i want it to be placed on gold, it makes it the most of the time on gold but sometimes its placed on stone <_< .how did u solve this bug ?

One more question relative to the same problem :
When in castle-age i want to make a town-center in that way :

Code: Select all

(defrule
	(current-age == castle-age)
	(resource-found stone)
	(and	(building-type-count town-center > 2)
		(building-type-count town-center < 4))
	(can-build town-center)
	(up-pending-objects c: town-center < 1)
=>
	(build town-center)
	(set-strategic-number sn-allow-adjacent-dropsites 1)
	(set-strategic-number sn-town-center-placement mining-camp)
	)
I want my TC to be built on stone. But he will be placed randomly on stone or gold...
Is it fixable ?

Sorry for my not great english ; I hope i am understandable.
Author of TRiBaL_Warrior, Yggdrasil, PharaoN, WoodyWood Pecker and currently :o dette :dance

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

Re: BruteForce AI

Post by _II2N_ »

The TC has to be forced on stone:

Code: Select all

(defconst gl-point-x 101)
(defconst gl-point-y 102)

(defrule
   (current-age == castle-age)
   (resource-found stone)
   (building-type-count town-center == 3)
   (can-build town-center)
   (up-pending-objects c: town-center < 1)
=>
   (up-get-point position-self gl-point-x); Get point of home TC
   (set-strategic-number sn-focus-player-number 0)
   (up-set-target-point gl-point-x); Set focus around home TC
   (up-reset-search 1 1 1 1)
   (up-reset-filters)
   (up-filter-distance c: -1 c: 30); No minimum distance to home TC, maximum distance 30 tiles
   (up-find-remote c: stone-mine c: 1)
)

(defrule
   (up-set-target-object search-remote c: 0); Found stone -> set it as target-object
   (current-age == castle-age)
   (resource-found stone)
   (building-type-count town-center == 3)
   (can-build town-center)
   (up-pending-objects c: town-center < 1)
=>
   (set-strategic-number sn-allow-adjacent-dropsites 1)
   (set-strategic-number sn-town-center-placement mining-camp)
   (set-strategic-number sn-placement-zone-size 5)
   (up-get-point position-object gl-point-x)
   (up-set-target-point gl-point-x)
   (up-build place-point 0 c: town-center)
)
At the end of each rule pass you must ensure that target-point is correct until the TC is placed (so that target-point still focuses the TC around stone and not elsewhere).

User avatar
Esty
Waheguru
Posts: 1159
Joined: Wed Dec 30, 2015 7:37 am

Re: BruteForce AI

Post by Esty »

Thank you so much for the fast of your answer. This is really smart. I'l right now test it. :)
Author of TRiBaL_Warrior, Yggdrasil, PharaoN, WoodyWood Pecker and currently :o dette :dance

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

Re: BruteForce AI

Post by scripter64 »

Oh hi, CheeseOnToast :) :)
Thanks, ER!

User avatar
CheeseOnToast
Yogi
Posts: 388
Joined: Sun Aug 31, 2014 5:48 pm

Re: BruteForce AI

Post by CheeseOnToast »

scripter64 wrote:Oh hi, CheeseOnToast :) :)
Thanks, ER!
ER is amazing :D :D :D :D :D

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

Re: BruteForce AI

Post by Promiskuitiv »

What happened? :D

User avatar
CheeseOnToast
Yogi
Posts: 388
Joined: Sun Aug 31, 2014 5:48 pm

Re: BruteForce AI

Post by CheeseOnToast »

Promiskuitiv wrote:What happened? :D
ER changed my old name from "SausageBread" to "CheeseOnToast" for me lol

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

Re: BruteForce AI

Post by Promiskuitiv »

7 i didn't even notice, nice! :D

Post Reply