Jester (V 2.3) & Forthwind (V 2.1)

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
screamingkoos
Forumer
Posts: 45
Joined: Wed Feb 05, 2020 6:27 pm

Jester (V 2.3) & Forthwind (V 2.1)

Post by screamingkoos »

Hi everyone, I have decided to update the main page here, as well make an additional post when a new update has become available! Enjoy!

*The following comes from the main Jester.per file which is included in the download*

JESTER.AI Created by ScreamingKoos
Version 2.3
Release Number: 9
Release Date: January 29, 2025

;==========OVERVIEW FOR BOTH AI's:==========
- Jester & Forthwind are two separate RM (random-map) ai's created by me.
- Jester can play any civilization in the game up to "The Mountain Royals" DLC (up to AND INCLUDING Armenians & Georgians). Jester can play as or counter any of these civs.
- Forthwind can play any civilization up to "The Lords of the West" DLC. This EXCLUDES: Armenians, Bengalis, Dravidians, Georgians, Gurjaras, and Romans. Forthwind will is not optimized to play as the new civs.
- Jester is stronger, more updated, and less random than Forthwind.
- Forthwind will tower-rush, build walls, and not play as competitively as Jester. Both ai's are, however, quite silly and fun to play with.
- Both ai's can play land maps (like arabia), connected water maps (like coastal), and separated water maps (like islands). They perform best on land maps and the least on island-style water maps. They do have basic water map rules for ships & economy for compatability purposes.
- They both can also play any nomad-style maps (where there is no town-center or lumber-camp to start with and they must start from scratch).
- Please note, both ai's are not tested to play the following map-types: Migration, "Nothing" style maps (like forest-nothing), and Michi style maps.
- Both ai's are aggressive. They have many different strategies that are initially randomly generated at the game start, and improve over time as the game plays. You will experience a different game every playthrough even if they use the same civilizations. You never know what to expect!
- Both ai's are fun to play with as allies, enemies, or even just spectating them fighting other custom created ai's.
- Jester gets his name from having a humorous twist on all things he does! (Forthwind is humorous too).
- Jester & Forthwind are only tested on and work for Age of Empires 2 Definitive Edition (No wololo-kingdoms, or HD editions sadly).
- I am not currently working on new updates for Forthwind (but may in the future), so for this reason the following below is mostly referring to Jester, although many of it still applies to Forthwind:

;==========DID YOU KNOW? (quick facts)==========
- Jester can play nomad style maps (land or water just not migration-types), and has rules to always prioritize either a lumber-camp, mule-cart, or town-center when his last tc is destroyed (or the game starts without one!)
- Jester will automatically sling extra resources to any allies that are low on resources. You can still use taunts 3 - 6 for a more manual way to ask for resources (player or computer allies).
- Jester will always mirror your diplomatic stance. Comes along with some chats for every type of stance change during the game. There is NO tricking this guy! ;)
- Jester responds to several taunts in the game and depending on the age may respond differently. Most taunts work when Jester is set as an ally. Taunts are listed below:

;==========;TAUNTS:==========;
; Use taunts 3 - 6 to ask for resources.
; Taunt 31 - Attacks immediately if he is able to (not under attack and has reasonable military).
; Taunt 32 - Pursue default aggressive strategy for current age (dependent on civ-selected).
; Taunt 33 - Pursue economy strategy for current age (boom).
; Taunt 36 - Disable attacking rules (use taunt 31 to re-enable afterwards).
; Taunt 37 - Build a wonder (imperial-age only)
; Taunt 43 - Current strategy information.
; Taunt 44 - Current resources & population information.
; Taunt 45 - Temporary retreat back to main town-center.
; Taunt 50 - flare a location on the map and send this taunt for a chance of Jester to build a tower, donjon, krepost, or castle at the location.
; Taunt 52 - flare a location on the map and then send this taunt for a chance Jester will build a market at the flared location.
; Taunts 61 - 68: Jester will temporarily target the numbered player (this taunt now works as intended, only resets if Jester is under attack or the target-enemy dies).
; Taunt 69 - Deletes the object at the flared location.
; Taunt 72 - Pursue militiaman-line (infantry) strategy.
; Taunt 73 - Pursue melee cavalry units strategy. (knights, shrivamsha-riders, savars, battle-elephants, steppe-lancers, camels, etc.). This is dependent on the current civilization and only works for that current age. Use these in imperial-age for a more permanent strategy.
; Taunt 74 - Pursue archer-line strategy (foot archer only).
; Taunt 76 - Drush the enemy (must be early dark-age to work).
; Taunt 104 - Fully turns off all resign rules (when taunting either enemy or ally Jesters).
; Taunt 105 - Revert back to default resign rules after taunt 104 was issued.
; Taunt 150 - Resign immediately (when spectating as Jester, useful for casting games).
; Taunt 151 - Resign immediately (when taunted to an ally or enemy Jester, useful for a stubborn opponent or casting games).
; Taunt 250 - Chats current Jester version.
; Taunt 251 - Chats certain testing strategic-numbers (I use this for testing Jester, but feel free to use it too lol).
; Jester also responds to some other taunts, but not in a way you would expect! (example: Taunt 69).

;==========UPDATES for Jester Version 2.3:==========
- Hey all! It's been a long time since I've updated old Jester! So here you are, get this update while its fresh! ;D
- This is a smaller but effective update aiming to make Jester more efficient and help eliminate the worst bugs from the previous version. Includes some much needed DUC bug fixes (that would make Jester act very odd!). The new banter chats in this update make the download worth it alone ;)
;====================================================
- Fixed a serious bug where Malay Jester's could sometimes get stuck in the dark age FOREVER if feudal-age was available too quickly in rare situations.
- NEW When attacking, Jester now uses backup DUC rules to send units that used to sit at home into the frontlines where they belong!
- All the proper units now retreat from enemy tower-class arrow fire (all units except infantry, cavalry & some siege units will not retreat anymore as originally intended). I appear to be using up-exlude-filter incorrectly or else it may be bugged! **thunder noises**
- Fixed a bug that would sometimes allow Gurjara Jesters to wander across the map at game start to allied/scouted berry bushes far outside of his town (Thank you distance-filter!)
- Jester now takes into account sn-defer-dropsite-placement making the mid to late game less likely for him to bug out when a camp was half built then destroyed.
- Fixed a bug where Jester would retreat every single time he prepared to attack. This was greatly worsened if there were any enemy buildings inside sn-safe-town-size (causing an endless retreat loop).
- Fixed a bug where Jester units would freeze when trying to avoid arrow fire from any building close to the map borders (still happens in rare cases but mostly fixed now).
- Fixed a DUC bug that would cause Jester's scout to occassionally retreat to the main TC if other military units were getting lured from his town.
- Removed some DUC constraints on pocket Jester's so that they can freely attack again without getting confused. (Pockets were repeatedly retreating when trying to attack with smaller numbers of military).
- Added a nice bug fix to allow Jester to play on all map-sizes again. This is especially true for world maps or any other custom maps. Jester no longer gets a game-start error because of map-sizes!
- Made some efficiencies/improvements to mule-cart building rules, includes favoring gold/stone piles more in the mid to late game.
- Jester can now properly research ri-siege-onager.
- Simplified Nomad scouting rules, although scouting sn's or other rules may be bugging this still...
- Updated MANY of the chats that Jester likes to send at different times (added new ones and provided improvements). Also fixed many of the "banter" chats so they send at the proper timings and should make more sense now (they were getting sent very randomly before).
- Other small bug fixes/improvements that I forgot what they were.
;----------END OF GENERAL UPDATES:----------

;==========CONCLUSION:==========
- Jester can be a fun ai to play with or against in team games, use in custom games (scenarios), or is commonly used for testing against other ai's.
- It is by no means a perfect ai, sometimes has bugs, and uses minimal DUC. But Jester has been an amazing project to work on for many years at this point (since the AOE II HD days).
- Please leave a comment of your experience on the ai scripters website, AOK Heaven website, or in the ai scripters discord group about your experience and if there is anything you'd like to see added/improved or just your general experience!
- Thank you for playing with Jester! GL & HF!!!
Your Pal, ScreamingKoos

;==========INSTALLATION:==========
- Simply download & unzip the Jester V 2.3.zip file and drag and drop everything into your AOE2 DE ai folder (the .ai file, the .per file, and the Jester folder).
Attachments
JESTER V 2.3.zip
JESTER - Version 2.3 (NEW)
(163.57 KiB) Downloaded 37 times
FORTHWIND V.2.1.zip
FORTHWIND - Version 2.1 (OLD)
(133.82 KiB) Downloaded 796 times
Last edited by screamingkoos on Wed Jan 29, 2025 3:48 pm, edited 38 times in total.
User avatar
wattle
Swami
Posts: 225
Joined: Fri Aug 15, 2014 1:06 pm
Location: Germany

Re: Forthwind.AI (Version 1.2)

Post by wattle »

Hi :)
Nice to have yet another DE AI. Maybe that could also take part in Esty's DE AI tournament when it happens.

I watched a couple games on extreme difficulty of your AI vs the Beginner AI and the DE AI.
It had some trouble with Beginners aggressive style (I'm not sure if the default Beginner does cheat on extreme).
It did hold not too bad vs the DE AI until late castle age.
While I'm not a great player, it seemed to me, that Forthwind did lure its boars mostly rather late. Sometimes at pop 27, is that intended.
Do maps influence its playstyle/early build apart from nomad start and watermaps?
It has the normal sheep killing behavior, where it kills multiple sheep under the TC. I guess it requires DUC to eat only one sheep at a time, do you have that on your list maybe?
I liked it milled the shorefish in a small pond, don't know if that is default AI behavior (I'm no AI scripter myself).
Nice to see it can handle nomad start.

Good readme, btw I wouldn't mind if you include some of the key info in your first post.

Did you consider/try to upload Forthwind as a DE AI mod, so more people may find it?

I assume you are not in the AIscripters discord, or are you? If not you may want join that, since it is more active than the forum, esp. for quick feedback. https://discord.gg/5Zea68s
MangudAI-all-in (wip, to be continued, when I retire from work :P )
Btw, thank you s64 for your effort. Was a pleasure to cross your way. Have a good time.
screamingkoos
Forumer
Posts: 45
Joined: Wed Feb 05, 2020 6:27 pm

Re: Forthwind.AI (Version 1.2)

Post by screamingkoos »

Hey Wattle,

Thanks for the feedback! AI tournaments? That would be fun! Initially Forthwind was not created to be competitive, but rather just most compatible with newer versions of the game for "semi-noob" human sort of performance. I would create maybe a seperate AI file if I ever were to submit him into a competitive AI competition.

Yes, so AI's like beginner and even the extreme DE will have no issue eventually out microing my ai, but on some maps Forthwind will never just "bug out" kind of thing (like on nomad or megarandom maps and is compatible with all civs currently now). There are many details I could include about what makes up Forthwind, I just didn't want to fill my first post with too many words lol!

Haha, yes you're not wrong for pointing out the bad boar rules. It used to have some actually pretty decent boar rules but while further testing them awhile ago I accidentally messed them up and just haven't got around to fixing them. I literally just learned what DUC (direct-unit control) was the other day so I'm quite new to some of the userpatch (UP) features. I've been slowly adding in more userpatch features for Forthwind as I test them and find they are stable enough for a release. So yes, DUC is on the list.

For the milling, yes I have it programmed currently to build a max of 2 mills. The first mill is built near a stable source of food (like berries), and a second is usually built by food that is a little further away (example: a mill near the deer on arabia-type maps). There is also an "emergency mill" rule that fires if Forthwind hasn't found any food at all and thinks he needs farms.

I'm not aware of where that is, but I will certainly look into it (about the DE AI mod).

I truly appreciate all of your feedback and for sure I'll check out the discord! Thanks wattle!
User avatar
marathon
Waheguru
Posts: 1984
Joined: Fri May 14, 2010 2:30 pm

Re: Forthwind.AI (Version 1.2)

Post by marathon »

I ran into issues with constants. I use WK (Userpatch 1.5) but the issues were unrelated.
I believe I can easily make this AI compatible with UP and WK, so that I can test it.

Welcome to the world of :head
(although you are an oldie, as it seems, but a proper welcome is imperative)
screamingkoos
Forumer
Posts: 45
Joined: Wed Feb 05, 2020 6:27 pm

Re: Forthwind.AI (Version 1.2)

Post by screamingkoos »

Oh man, the legend himself! (hint: marathon) ;)

Thanks for the welcome! I haven't played WK before but if you are able to get it up and running then by all means! For now I'm only testing Forthwind on DE as that's what I play.

(I've been around for a bit but was a fly on the wall simply observing for a long time, now I'm hoping to be more involved)

I'm very excited about the continuous :head it's what I'm here for, lol.
User avatar
wattle
Swami
Posts: 225
Joined: Fri Aug 15, 2014 1:06 pm
Location: Germany

Re: Forthwind.AI (Version 1.2)

Post by wattle »

I forgot to mention, I noticed Forthwind walls at some point (not sure if always) and it can lead to hurting itself (which is ofc why many AI don't do it), but also it happend to send vills to its death, because it was stubborn to try complete its wall, while the enemy was in full charge. Also it even walled on arena, which was kinda funny :) like double wall arena 11, but that cost it many vills. At least for arena should be disabled.
I guess you use the default wall building method (like aoc/petersen AI), using UP features for defining wall and gate position is probably not too easy.

https://www.dropbox.com/s/kpuclvq3aq3vz ... d_wall.png

Btw did you base your script on something existing like the petersen AI or create it from scratch?
MangudAI-all-in (wip, to be continued, when I retire from work :P )
Btw, thank you s64 for your effort. Was a pleasure to cross your way. Have a good time.
screamingkoos
Forumer
Posts: 45
Joined: Wed Feb 05, 2020 6:27 pm

Re: Forthwind.AI (Version 1.2)

Post by screamingkoos »

Hey Wattle!

I'm not sure how to @ you (if that's possible on this site, I really don't know).

But yes Forthwind does wall, he builds on the "perimeter 2" wall (so the outer wall when compared to perimeter wall 1). There are several rules regarding when he specifically walls. For one, he walls when he senses his military is outnumbered by a decent amount. There is no timer or anything regarding these rules. For actually building the walls there are like 10 to 15 rules affecting walling. I know what you mean though by how he kills himself, it's because the wall foundation is placed and Forthwind is extremely stubborn about building it at all costs. There are a few strategic numbers that come to mind that I may change in a future update (i.e., setting dynamic values for sn-percent-building-cancellation depending on enemy strength etc) to counter this behaviour.

I know there must be a way to sense these situations (vils under attack while building a wall) and then canceling the foundations by using UP commands, I just don't know UP commands well enough yet. Once I can figure something out though (including for other buildings) I will incorporate it into Forthwind. Currently when Forthwind is under attack he "pauses" wall building, but by that time there are already 10+ wall foundation tiles placed down, so he continues heading out to them.

You're right! I need to actually change some of the wall rules too now (they are from a long time ago like a year or more lol). I'll figure out how to disable wall building on "wall maps" once I sit down and revise the rules.

Honestly I don't know who or what peterson AI is, but I built my script and files from scratch. There are certainly bits and parts that have been influenced from other AI's, but I have been working on Forthwind for over like 2 years (very casually, on and off). I started from the bottom and I'm happy I could finally share Forthwind with other people (or even AI's to fight).

Thank you Wattle for your feedback and any questions at all are more than welcome! I could go on all day about AI theory ;)
User avatar
wattle
Swami
Posts: 225
Joined: Fri Aug 15, 2014 1:06 pm
Location: Germany

Re: Forthwind.AI (Version 1.2)

Post by wattle »

screamingkoos wrote: Wed Feb 03, 2021 11:27 pm I'm not sure how to @
I don't know either, assume it is not possible here, but on discord it is.
edit: Apparently if you quote me/someone it should send a notification.

Thx for your detailed reply and I like it walls only in specific situations. For AI vs AI it might overall be stronger to not wall, but I imagine against human player there are some that even prefer to have a walled AI.

I think the default aok/aoc AI is often here referred to as petersen AI because it's been scripted by Sandy Petersen iirc.
MangudAI-all-in (wip, to be continued, when I retire from work :P )
Btw, thank you s64 for your effort. Was a pleasure to cross your way. Have a good time.
User avatar
Leif Ericson
Waheguru
Posts: 1441
Joined: Wed Dec 09, 2009 8:15 pm
Location: United States

Re: Forthwind.AI (Version 1.2)

Post by Leif Ericson »

Yeah, Petersen is just the CD version AI.

For your current experience level, if you want your AI to build walls then your walling rules may make sense. Making walls with UP commands is a lot harder. You could try adding in (up-assign-builders c: stone-wall-line c: 0) whenever your AI is under attack and setting it back to a number higher than 0 when the town is safe. You can also use this to assign more than one builder to the walls. https://airef.github.io/commands/comman ... n-builders

For detecting wall maps you can simply use
#load-if-not-defined ARENA-MAP
#load-if-not-defined FORTRESS-MAP

...add walling code here

#end-if
#end-if
screamingkoos
Forumer
Posts: 45
Joined: Wed Feb 05, 2020 6:27 pm

Re: Forthwind.AI (Version 1.2)

Post by screamingkoos »

Hey Wattle,
wattle wrote: Thu Feb 04, 2021 12:02 am
screamingkoos wrote: Wed Feb 03, 2021 11:27 pm I'm not sure how to @
I don't know either, assume it is not possible here, but on discord it is.
edit: Apparently if you quote me/someone it should send a notification.
Is this how you quote someone?

Yeah I agree! Forthwind does like to get stuck once in awhile with lumberjacks when the wall is between a lumbercamp and a forest. Forthwind has always originally been able to wall and I guess I kept it that way cause it's nostalgic a bit. Most AI's don't wall so I enjoy it that mine does.

OH. Haha. I had no idea that was the aok ai! To answer your question from before (does my ai use the default method) then yes it does, using perimeter wall and such, but the rules implement a few goals as checks and balances (I'm also improving them before I release version 1.3).

Hey Leif,

Thank you for your comment! Forthwind builds palisade walls and gates + stone walls and gates depending on different criteria. I am currently updating the rules so they are more clean as well I I will incorporate both of your ideas here! When I was trying to define which maps NOT to build on I was having trouble getting (map-type hideout) and (map-type hillfort) to work, so using the #LOAD-IF-NOT-DEFINED commands will be super useful.

Also I found a command called up-reset-placement. Would this command be useful for temporarily resetting the wall-class and gate-class placement? I'll run some tests, and thanks for the feedback!

Really appreciate both of your replies Wattle and Leif!
Post Reply