Page 1 of 1

BlackKnight AI

Posted: Fri Jan 13, 2023 5:47 pm
by MrElephant
Hello All,

I know I stated I wasn't going to make another AI, but I couldn't help myself. On the 14Nov2022, I made the AI tutorial- the link under the resources section on Twitch.

https://www.twitch.tv/videos/1655268471

In that tutorial- I made a tutorial AI that could beat the CD AI (Warrior AI) for anyone or everyone to use as a base.

I continued working on the file. This eventually led to a completely new AI I call BlackKnight. The name comes from inspiration on one of my favorite AIs- Whiteknight :) And no, this name has not been used before.
Some of you were hoping I would make an AI with userpatch stuff again, and well- here it is. I originally finished working on it around the 1Dec2022. That changed when I thought this ai could be improved even more. A small edit yesterday for a monk situation was worked on- and that led to other changes. It goes to show you how much an AI can be developed in a short amount of time.

This AI is fairly strong. It is easily the best AI I have made. It is stronger than Reactionaray, Charon (plus my other AIs not mentioned). It has beaten Kosmos, Ranger, and Sigurd. It can play a fair game against stronger AIs, but not the impossibles. I would daresay this AI could be included on your ladder Leif.

Issues:
Code uses old boar hunting method
Some inconsistent eco leading to possible idle dark age tc time

Inspiration and Credit:

Fireball for his micro code. Bari and Norman_Duck plus Berry and Unfairsteel for training against their AIs.
Promi for a little guidance as well.
Jan1302- as this AI started out as a builder AI.
BTG- His tutorial AI really is awesome. I can't state this enough, please check it out if you want to learn scripting.

I am including the original Warrior AI code as an attachment in case it ever leaves my google drive. Feel free to use the Warrior AI code as a base for your future AIs. Remember to give credit to Jan- as it started out as a builder AI.

The 13Jan2023 is the version I recommend downloading. It just has a tiny modification from the 3Dec2022. (The monk change previously spoken about)

Thanks to Kim for letting me know on the missing file error in the 13Jan2023 file.

Major Update 15Mar2023 with the following-

Deer Luring included
Boar Luring is included
Better lumber-camps and mills
New and improved towers
TSA much improved plus general attacking much improved
Key researches improved
Just general strategy improvements
Farm bug corrected
Other late game unit issue fixed (mostly)

Update 23Mar2023
Several changes made-minor updates. Fixed some attacking code as well

Update 2Apr2023
DUC changes to include Man-at-arms in feudal age
Better TC placement next to resources
Earlier researches for key techs
Slight modification to building houses

Update 9Apr2023
Mining camp errors fixed
Villager proportions fixed in team games

Game Settings:

Civs: Teutons preferred, but any knight civ should work
Maps: Land only

Most recent version: https://forums.aiscripters.com/download ... hp?id=6977

Re: BlackKnight AI

Posted: Wed Mar 15, 2023 7:05 pm
by MrElephant
BlackKnight has been updated. Looking for possible feedback to this AI.

Re: BlackKnight AI

Posted: Thu Mar 23, 2023 5:10 am
by yuu2319
Is the uploaded file missing something? I can't seem to find the AI in AI selection. I'm playing on DE version.
Btw your Reactionary AI is very good, he plays a variaty of units, I'm a casual player so it's very fun playing with him.

Re: BlackKnight AI

Posted: Thu Mar 23, 2023 6:03 am
by wattle
yuu2319 wrote:
Thu Mar 23, 2023 5:10 am
Is the uploaded file missing something? I can't seem to find the AI in AI selection. I'm playing on DE version.
Btw your Reactionary AI is very good, he plays a variaty of units, I'm a casual player so it's very fun playing with him.
I see it is missing the empty, but same named ai file.
Create a new txt file BlackKnight.txt and rename it to BlackKnight.ai and you should see it in the AI list.

Every AI should consist of one *.per file (which contains the actual script) and one *.ai file which is empty and serves the sole purpose, to recognise the *.per file.

Re: BlackKnight AI

Posted: Thu Mar 23, 2023 6:25 am
by MrElephant
Thanks yuu2319 for the kind words of Reactionary. BlackKnight is very different from that AI. Hopefully you will enjoy it as well, and have reuploaded with the .ai file. It is a slightly newer version with some changes.

Also, thank you to Wattle for describing how ai files work in general.

Re: BlackKnight AI

Posted: Sun Apr 02, 2023 4:27 pm
by MrElephant
BlackKnight has been updated with some very important feudal age tactics. Please use this version for the ladder.

Re: BlackKnight AI

Posted: Mon Apr 10, 2023 9:02 am
by MrElephant
Issues with mining camps has now been corrected.

Villager populations have been modified so a greater military population exists in team games.

Re: BlackKnight AI

Posted: Sat Mar 02, 2024 8:54 pm
by MrElephant
This is a smaller update for BlackKnight, but one that is important. Its regarding the code behind the player targeting subsection- and now has been rectified. Thanks Leif for the assistance in this. It was a very important update.