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

- CheeseOnToast
- Yogi
- Posts: 387
- Joined: Sun Aug 31, 2014 5:48 pm
Re: BruteForce AI
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.
Will look into improving Arena some more.

Will look into improving Arena some more.
- Esty
- Guru
- Posts: 923
- Joined: Wed Dec 30, 2015 7:37 am
Re: BruteForce AI
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 :
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.
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

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)
)
Is it fixable ?
Sorry for my not great english ; I hope i am understandable.
Author of the TRiBaL_Warriors AI and currently PharaoN 

-
- Guru
- Posts: 639
- Joined: Thu Jul 14, 2011 8:44 am
Re: BruteForce AI
The TC has to be forced on stone:
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).
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)
)
- Esty
- Guru
- Posts: 923
- Joined: Wed Dec 30, 2015 7:37 am
Re: BruteForce AI
Thank you so much for the fast of your answer. This is really smart. I'l right now test it. 

Author of the TRiBaL_Warriors AI and currently PharaoN 

-
- Waheguru
- Posts: 5891
- Joined: Fri Jan 16, 2009 8:36 pm
Re: BruteForce AI
Oh hi, CheeseOnToast

Thanks, ER!


Thanks, ER!
- CheeseOnToast
- Yogi
- Posts: 387
- Joined: Sun Aug 31, 2014 5:48 pm
Re: BruteForce AI
ER is amazingscripter64 wrote:Oh hi, CheeseOnToast![]()
Thanks, ER!





- Promiskuitiv
- Waheguru
- Posts: 1309
- Joined: Thu Nov 10, 2011 1:07 pm
- CheeseOnToast
- Yogi
- Posts: 387
- Joined: Sun Aug 31, 2014 5:48 pm
Re: BruteForce AI
ER changed my old name from "SausageBread" to "CheeseOnToast" for me lolPromiskuitiv wrote:What happened?
- Promiskuitiv
- Waheguru
- Posts: 1309
- Joined: Thu Nov 10, 2011 1:07 pm