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
User avatar
CheeseOnToast
Yogi
Posts: 388
Joined: Sun Aug 31, 2014 5:48 pm

BruteForce AI

Post by CheeseOnToast »

Note: This version of BruteForce is for UserPatch 1.4+ ONLY use the Steam Workshop version for HD Edition. (http://steamcommunity.com/sharedfiles/f ... =463466878)
BruteForce is a powerful and strong aggressive rushing and booming AI with many strategies at its disposal. It has the ability to adapt and maintain pressure with ease and with sustainable eco and market sell and trade functionality. it can also play many different kinds of maps including custom scenarios (excluding maps like Castle Blood) excluding nothing maps and migration style maps.

The AI does cheat on Hardest difficulty.

- Features -

- Can play any civilization from AoK/AoC/AoF/AoAK!
- Can play Random Map/Turbo Random Map, Regicide, Death Match and King of the Hill
- Can play with human allies or other AI allies! Including the built in AI, Promi, The Horde, Barbarian, The Unknown and many others!
- Can play on almost any map!
- Can lure boar on any difficulty!
- Can disable resigning functionality by taunting "63" to the AI, this is recommended for FFA games or something.
- Can resign (but hopefully won't be seen or seen very often!) when it knows it cannot win, both in 1v1's and Team Games.
- Can play Team Games effectively (And can play with other AI's such as ResonanceBot, Logbot and Promisory (Computer))
- Human like difficulty which scales depending on player ability
- Can play 2v6 Mode on Hardest difficulty.
- Monster mode increases Hardest by a small amount (for those who find standard Hardest too easy.)
- Chaos Mode makes Hardest even more of a challenge! (More designed for 1v2 or 1v3 type situations)
- Lots more features and functions!

Game Settings:
- Game Type: Random Map/Turbo Random Map, Regicide, Death Match and King of the Hill
- Map type: Any map (besides migaration and nothing maps, it may work but preformance is unknown.) Prefers Land Maps. Some RMS' might not work correctly.
- Difficulty: Can play on any difficulty. (Optimized for Hard/Hardest)
- Resources: Prefers Low/Standard Resource start.
- Population: Any but optimized for 200.
- Starting Age: Dark Age/Standard. Post Imperial for Death Match
- Victory Conditions: Optimized for conquest but can play with standard victory on.
- Full Tech: Recommended to be turned off as BruteForce may expirence odd behaviour.
- There is a 6v2 Mode and 5v3 Mode but it must be on Hardest to be played.

** Taunt List **
BruteForce responds to these taunts.

* 3: Ask for food
* 4: Ask for wood
* 5: Ask for gold
* 6: Ask for stone
* 31: Ask for AI to attack its target player (You can use this w/without using taunts 231-238)
* 36: Ask for AI to wait for your signal to attack
* 34: Ask AI to build a navy
* 35: Ask AI to stop building a navy
* 38: Ask for extra resources that the AI can spare.
* 40: Controlled market placement
* 41: Turn on monster mode
* 63: Disables the AI from resigning (there is no way to enable resigning again.)
* 83: Disable AI chatting (taunting 83 when disabled enables it again, be ready for taunt spam!)
* 105: Enable/Disable wall building switch. (Any age/any difficulty) Note: it has no intelligence when to do this when you enable.
* 110: Flares AI's location (UP Only)
* 200: Enables cheating on Hard difficulty (HD only) On Hardest, allows you to enable Chaos Mode.
* 210: Request resources for a new Town Center
* 222: To request help/assistance to kill a player. (You can use this w/without using taunts 231-238)
* 223: Chooses a random name for BruteForce (userpatch only)
* 231 - 238 allow BruteForce to target an enemy player (for example, taunting 234 to BruteForce will make it target player 4.)
Attachments
BruteForce 2.14L17.zip
Latest
(158.16 KiB) Downloaded 476 times
Last edited by CheeseOnToast on Fri May 27, 2016 2:36 am, edited 33 times in total.

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

Re: BruteForce AI

Post by Campeador »

Welcome to aiscripters forum, Sausage/Cheese (nice names :P).

Although I disagree that thing about "rookie scripter" after to test your Korean Bruteforce, quite annoying trush.

Scrow. I'd need my other PC, only available at weekends, because I don't use them in my scripts, ofc I know thy are an useful tool. But perhaps you find interesting this Finaldeath's trick. It's about cancel units of a specific type when it allows enough resources to get their desired upgrade. I use it in Cruzada:
http://forums.aiscripters.com/viewtopic ... 2&start=50

I know that escrows have the advantage to accelerate upgrades even more, but both ways are semicompatible.

User avatar
Wergorne
Forumer
Posts: 20
Joined: Fri Nov 30, 2012 6:13 am

Re: BruteForce AI

Post by Wergorne »

The problem is in your ram rules. Rams are units, not buildings. Use (can-afford-unit battering-ram-line) instead of (can-afford-building battering-ram-line).

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

Re: BruteForce AI

Post by CheeseOnToast »

Wergorne wrote:The problem is in your ram rules. Rams are units, not buildings. Use (can-afford-unit battering-ram-line) instead of (can-afford-building battering-ram-line).
How embarrassing, I wouldn't have saw that in a million years. I'll edit that part in my script and see if it still crashes or not, Thanks Wergorne!

Edit; and it worked, wooohooo

Thanks Campeador. :P

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

Re: BruteForce AI

Post by scripter64 »

Welcome to the forums, SausageBread! :)

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

Re: BruteForce AI

Post by CheeseOnToast »

Thanks for the warm welcome! :D Something else I wanted to know though;
I've wanted to achieve something like this

Code: Select all

(defrule
	(not(town-under-attack))
	(taunt-detected any-ally 222)
=>
	(set-strategic-number sn-target-player-number -1)
	(set-strategic-number sn-focus-player-number this-any-ally)
	(attack-now)
	(chat-to-allies "On my way to help assist you!")
	(acknowledge-taunt this-any-ally 222)
)
This rule is supposed to detect a "request help" taunt and I was hoping for it to set the focus player to the ally that requires help, but it seems that doesn't seem to work (this-any-ally returns a value of 101) is there any way to obtain the player ID of this-any-ally or am I going about this the wrong way? Any help is appreciated.

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

Re: BruteForce AI

Post by _II2N_ »

(taunt-detected any-ally 222) => (up-get-player-fact this-any-ally player-number 0 temporary-goal)(up-modify-sn sn-focus-player-number g:= temporary-goal)

Attack-now may not be reliable way to send help though.

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

Re: BruteForce AI

Post by CheeseOnToast »

Well I kinda wanted to keep compatibility with HD, however, I think this might do the trick?

Code: Select all

; request help
(defrule
	(not(town-under-attack))
	(taunt-detected 1 222)
	(players-stance 1 ally)
=>
	(set-strategic-number sn-target-player-number -1)
	(set-strategic-number sn-focus-player-number 1)
	(set-goal gl-enable-tsa 2) ; force TSA regardless of military level.
	(chat-to-allies "On my way to help assist you!")
	(acknowledge-taunt 1 222)
)
(defrule
	(not(town-under-attack))
	(taunt-detected 1 222)
	(not(players-stance 1 ally))
=>
	(chat-local-to-self "ignore that request")
	(acknowledge-taunt 1 222)
)
(defrule
	(not(town-under-attack))
	(taunt-detected 2 222)
	(players-stance 2 ally)
=>
	(set-strategic-number sn-target-player-number -1)
	(set-strategic-number sn-focus-player-number 2)
	(set-goal gl-enable-tsa 2) ; force TSA regardless of military level.
	(chat-to-allies "On my way to help assist you!")
	(acknowledge-taunt 2 222)
)
(defrule
	(not(town-under-attack))
	(taunt-detected 2 222)
	(not(players-stance 2 ally))
=>
	(chat-local-to-self "ignore that request")
	(acknowledge-taunt 2 222)
)
(defrule
	(not(town-under-attack))
	(taunt-detected 3 222)
	(players-stance 3 ally)
=>
	(set-strategic-number sn-target-player-number -1)
	(set-strategic-number sn-focus-player-number 3)
	(set-goal gl-enable-tsa 2) ; force TSA regardless of military level.
	(chat-to-allies "On my way to help assist you!")
	(acknowledge-taunt 3 222)
)
(defrule
	(not(town-under-attack))
	(taunt-detected 3 222)
	(not(players-stance 3 ally))
=>
	(chat-local-to-self "ignore that request")
	(acknowledge-taunt 3 222)
)
(defrule
	(not(town-under-attack))
	(taunt-detected 4 222)
	(players-stance 4 ally)
=>
	(set-strategic-number sn-target-player-number -1)
	(set-strategic-number sn-focus-player-number 4)
	(set-goal gl-enable-tsa 2) ; force TSA regardless of military level.
	(chat-to-allies "On my way to help assist you!")
	(acknowledge-taunt 4 222)
)
(defrule
	(not(town-under-attack))
	(taunt-detected 4 222)
	(not(players-stance 4 ally))
=>
	(chat-local-to-self "ignore that request")
	(acknowledge-taunt 4 222)
)
(defrule
	(not(town-under-attack))
	(taunt-detected 5 222)
	(players-stance 5 ally)
=>
	(set-strategic-number sn-target-player-number -1)
	(set-strategic-number sn-focus-player-number 5)
	(set-goal gl-enable-tsa 2) ; force TSA regardless of military level.
	(chat-to-allies "On my way to help assist you!")
	(acknowledge-taunt 5 222)
)
(defrule
	(not(town-under-attack))
	(taunt-detected 5 222)
	(not(players-stance 5 ally))
=>
	(chat-local-to-self "ignore that request")
	(acknowledge-taunt 5 222)
)
(defrule
	(not(town-under-attack))
	(taunt-detected 6 222)
	(players-stance 6 ally)
=>
	(set-strategic-number sn-target-player-number -1)
	(set-strategic-number sn-focus-player-number 6)
	(set-goal gl-enable-tsa 2) ; force TSA regardless of military level.
	(chat-to-allies "On my way to help assist you!")
	(acknowledge-taunt 6 222)
)
(defrule
	(not(town-under-attack))
	(taunt-detected 6 222)
	(not(players-stance 6 ally))
=>
	(chat-local-to-self "ignore that request")
	(acknowledge-taunt 6 222)
)
(defrule
	(not(town-under-attack))
	(taunt-detected 7 222)
	(players-stance 7 ally)
=>
	(set-strategic-number sn-target-player-number -1)
	(set-strategic-number sn-focus-player-number 7)
	(set-goal gl-enable-tsa 2) ; force TSA regardless of military level.
	(chat-to-allies "On my way to help assist you!")
	(acknowledge-taunt 7 222)
)
(defrule
	(not(town-under-attack))
	(taunt-detected 7 222)
	(not(players-stance 7 ally))
=>
	(chat-local-to-self "ignore that request")
	(acknowledge-taunt 7 222)
)
(defrule
	(not(town-under-attack))
	(taunt-detected 8 222)
	(players-stance 8 ally)
=>
	(set-strategic-number sn-target-player-number -1)
	(set-strategic-number sn-focus-player-number 8)
	(set-goal gl-enable-tsa 2) ; force TSA regardless of military level.
	(chat-to-allies "On my way to help assist you!")
	(acknowledge-taunt 8 222)
)
(defrule
	(not(town-under-attack))
	(taunt-detected 8 222)
	(not(players-stance 8 ally))
=>
	(chat-local-to-self "ignore that request")
	(acknowledge-taunt 8 222)
)
I have yet to test and put it into practice though.

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

Re: BruteForce AI

Post by scripter64 »

Yes, it looks like that would work to set the focus-player to the ally asking for help :)

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

Re: BruteForce AI

Post by Promiskuitiv »

Although i'm not sure if the capability for that (focus-player -1) was implemented in the HD edition of the game, so just try it out first.

Post Reply