BlackKnight 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
MrElephant
Swami
Posts: 115
Joined: Sun Dec 20, 2020 6:28 am

BlackKnight AI

Post 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
Attachments
BlackKnight 9Apr2023.zip
(49.08 KiB) Downloaded 148 times
warrior ai 14Nov2022 (1).zip
(9.25 KiB) Downloaded 113 times
Last edited by MrElephant on Sat Mar 02, 2024 8:56 pm, edited 9 times in total.
Author of Charon, Reactionary, Ahulane, and BlackKnight!

User avatar
MrElephant
Swami
Posts: 115
Joined: Sun Dec 20, 2020 6:28 am

Re: BlackKnight AI

Post by MrElephant »

BlackKnight has been updated. Looking for possible feedback to this AI.
Author of Charon, Reactionary, Ahulane, and BlackKnight!

yuu2319
Forumer
Posts: 3
Joined: Tue Feb 07, 2023 4:49 am

Re: BlackKnight AI

Post 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.

User avatar
wattle
Swami
Posts: 200
Joined: Fri Aug 15, 2014 1:06 pm
Location: Germany

Re: BlackKnight AI

Post 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.
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
MrElephant
Swami
Posts: 115
Joined: Sun Dec 20, 2020 6:28 am

Re: BlackKnight AI

Post 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.
Author of Charon, Reactionary, Ahulane, and BlackKnight!

User avatar
MrElephant
Swami
Posts: 115
Joined: Sun Dec 20, 2020 6:28 am

Re: BlackKnight AI

Post by MrElephant »

BlackKnight has been updated with some very important feudal age tactics. Please use this version for the ladder.
Author of Charon, Reactionary, Ahulane, and BlackKnight!

User avatar
MrElephant
Swami
Posts: 115
Joined: Sun Dec 20, 2020 6:28 am

Re: BlackKnight AI

Post by MrElephant »

Issues with mining camps has now been corrected.

Villager populations have been modified so a greater military population exists in team games.
Author of Charon, Reactionary, Ahulane, and BlackKnight!

User avatar
MrElephant
Swami
Posts: 115
Joined: Sun Dec 20, 2020 6:28 am

Re: BlackKnight AI

Post 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.
Attachments
BlackKnight 2Mar2024.zip
(50.3 KiB) Downloaded 53 times
Author of Charon, Reactionary, Ahulane, and BlackKnight!

Post Reply