Please welcome my AOK Vanilla AoE 2 AI that I will be working on, Charon. The AI's name comes from Greek mythology - the ferryman of the dead.
First, this AI is made for AOK- as mentioned in the title. This means the AI is made for the original base game. The plans are to make this AI support all civilizations in Age of Kings. Currently the preferred civilization is China, but I have tested it with Teutons- and it seems to play fine with them as well. No unique units are created at this point. What you will notice with this AI is that it will only produce 50 villagers, and that is because the original game only supports 50 working villagers. There are also some other key differences which I will not go into here.
Game Types:
Versions: This AI is meant to run on AOK, but has been tested on future iterations of the game- and is compatible.
Map Types: Charon can play on land and water maps. Specifically Black Forest, Arabia, Islands, and Team Islands. Other land maps are supported, but the AI will consider the map to be a land map.
Civilizations: Charon prefers to play Goths followed by Chinese right now. All other AoK civs can be used however.
Population: The AI is meant for 125 population- the competitive population of that era. However, it does not resign if another population limit is selected.
Future Updates:
Implement Japanese Civ.
Implement Viking Civ possibly.
Continue monitoring water strategy, and testing for improvements.
Unique units to be added.
Additional strategies to be added (possibly for water?)
Side Note:
I am also including in this post a previous AI that I worked on, Thanatos. A few of you may of heard of me working on this creation. Originally I spent four months working on this AI only to find out 50 villagers were supported in the base game. This led to me having to completely restart my AI from scratch with a brand new strategy. Thanatos is a decent AI- but it needs the 100 villagers support for its economy. In case you are interested, its name comes from the Greek word, meaning Death. It can play any AOK civ, but I found it prefers to play Persians. It prefers to play land maps, but water maps can be played as well.
Edit: 12Jul2022- Included an old collection of files for Thanatos. Nothing significant should have changed vs 25Jun2022 files, but should have included the 10Jul2022 zip.
Update 15Aug2022- Additional strategies are included. Furthermore, Charon responds to 150 and 151 taunts for tournaments, or removing debug messages.
Update 13Jan2023-Important changes and corrections have been made. Corrections to farm issues, and a lot of additional changes have been made. Especially to Charon. I consider Thanatos to be complete at this point. I may come back to work on Charon in the future. Problem is, he has reached his 1000 rule limit, and is pretty difficult to work on. It should be noted that Charon is the better of the two AIs overall. If the game lasts long enough, Thanatos can beat him though possibly. At this point, Charon does produce Chu Ko Nu, and will produce bombard cannons if Teutons are chosen. Chinese are still preferred.
Update 24Jan2023- Issues with goals and Charon not building his walls in late Imperial-fixed. Water Strategy attacking much improved!
Update 29May2023- Many updates here
-Knight/Camel strategy much improved
-Archer strategy much improved
-MAA strategy much improved.
-Added Goths as a civ. Only plays MAA at this time.
-Team games now will choose a strategy based on player number/pocket/flank play. This is unless the player selects a strategy for Charon to play.
-Other strategies can be selected now. 150 for MAA, 152 for Knights, 153 for Camels, and 154 for Archers.
-Timer reorganized to ask for help more often when under attack. To continue viewing to make sure this is accurately working.
25Jun2023 - Slightly adjusted to play land nomad
-Scout strategy created when camel strategy is chosen for non-camel civs.
19Jan2024
An update for Charon
-Some extra non needed bad farm check rules were commented out. Not needed, and space for rules was needed.
-Some very old special "retreat" code was included. This is based on the old Kosmos and BTG ais, but mainly from Bari. This was very much needed.
-Team Attack rules were updated. Countdown timer was reduced so Charon can attack more often.
An update for Thanatos (I know I said I wasnt going to work on him anymore, but couldnt help it)
-Thanatos now knows which game he is playing (AoK, AoC, HD, or DE). This is still preliminary and in testing, but should work.
-Thanatos should be able to play all game versions mentioned above.
-Thanatos is now capable of boar hunting and other DE specific items when using that version.
-Savar included for Persians on DE only
-Attacking was updated a tad.
23Feb2024
-Providing this update, as Charon is now much better at playing water.
-This includes better training rules on water, researches, and better resign rules as well.
-Charon will attempt to place his TC and lumber/mining camps on your island if given the opportunity late game.
Edit 9Apr2024
-Made updates to the feudal eco buildings and market rules.
-Updated TSA so increasing town size attack would not reduce back to the minimum size after a castle was placed.
Edit 23Jun2024-
Charon has some major changes- and this is a temporary version- rushed to get this out there for the ladder.
-Eco is improved, in conjunction with military training
-Retreating improved especially in terms of castles
-Custom map settings improved - Charon is able to detect if boats are needed including transports on those maps (hopefully).
-Just general ai rule improvements
DE.....
Right now on DE wall-completed-percentage for wall 2 is not working. As I do not wish this to be an issue on that ladder, I have included the below command. This should not have an impact on AoK, but I want full transparency this would not typically be in an AoK ai, but the AI should still function.
#load-if-defined DE-AVAILABLE
(defrule
(civ-selected gothic)
=>
(set-strategic-number 304 1)
)
(defrule
(current-age == imperial-age)
(current-age-time >= 720)
;(goal goal-wall 1)
(can-build-gate 2)
(goal is-town-under-attack 0)
(civ-selected gothic)
=>
(build-gate 2)
)
#end-if
Small Issues
-There is a small issue with Attack-now with Charon. 100% of troops are not being used, this is not affected by sn-percent-attack-soldiers.
Overall, in my opinion, Charon has greatly improved recently- and I hope you enjoy the AI as much as I do.
Civ wise- Goths are strongly preferred. If you are just looking for a simple AI, the other AOK civs can be used.
1Jul2024
There is a minor issue occurring with Attack-now in Charon. (solved- attack-now must be triggered more than once if group is larger than 60 units, which was actually remedied by the workaround.)
Spoke with several individuals, but couldnt figure out why attack-now wasnt sending 100% of troops.
A workaround has been remedied. Hopefully the issue will not persist.
This should mainly impact late castle-age or imperial. (Most single player games shouldnt last that long with Charon).
16Jul2024
Major update for team related games. TSA and Attack-now commands have been updated
1v1 battle style has not been impacted by this change, but Charon should be able to provide support a little earlier.
9Aug2024
An update for mixed maps. Definitely not the strongest game type for Charon- but it is an additional option for him. Took some time to update for this, and is a nice feature to have. Unfortunately, right now Charon has filled up the string table - so max 4 players on AoK, DE can have all 8 players. I might have a quick update here soon after I reduce the number of strings. >75 pop issue fixed in non standard maps for man at arms. This was already done for standard maps.
Future updates:
Escrow with counter units - to look into for units that are not used as frequently including mangonels.
I will be reviewing duplicate counter unit rules, to reduce rule count
String table issue described above.
Pikemen research earlier possibly- described by Leif on the ladder.
Charon should use scorpions a little more frequently to counter additional units.
27Oct2024
This is just a tiny update for AoK to fix the string table issue described previously. You can have eight Charon's now in AoK.
10Dec2024
A lot of changes have taken place.
Better eco- idle TC time much reduced. This was a major issue to overcome.
Pop Space Issue Resolved to reach imp faster- 50 population AIs have trouble reaching imp. To reach imp faster, Charon has implemented a feature to control pop space in Castle age!
Charon pushes forward buildings now under military superiority when he has enough wood
Charon's fixed code to detect enemy age up to castle- Ugh, didnt know this was an issue- but its now resolved. Important for the below item
Charon now can detect rushing- Yes, this is definitely new. Might need a little more work, but it's something. He should know when a person is trying to hit castle age early. It was important to implement, so Charon can detect whether ri-pikeman should be researched earlier for instance.
Charon can now detect whether he is flank or pocket in team games on a standard land style map. - This is a bit crude, but its something. I love working through issues like this with the Non UP ai.
Fixed secondary mill placement
Improved Charon's judgement skills on when to attack.
The above was a ton of work, but definitely worth the updating. Will definitely touch base soon with further updates.

31Dec2024-
Tiny fix for enemy age check in dark age.
LINKS INCLUDED ON THIS DIRECT POST ARE OLD VERSIONS- SEE MOST RECENT POST FOR UPDATED VERSIONS!
Charon download: download/file.php?id=7190
Thanatos download: download/file.php?id=6952