Nullkiller AI

I am absolutely in favor of getting this into mainline.

With the ai we currently ship, it isn’t really possible to have an enjoyable singleplayer game.

1 Like

Hope I will be able to merge latest develop soon.

3 Likes

waiting with great impatience

Hello.
First I want to thank you the effort to create a competitive AI.
I’m sure that is not easy to do this.
Yesterday I installed your Nullkiller AI and I was trying to play a Medium map.
I notice a few changes like the AI attacked me to one hero that was weaker than him.
So this is an improvement respect the original AI of VCMI that never attack.

But the problem is that in the day 7 of the month 2 there is a fatal error
like you can read in the picture.
Orange player I think is trying to built a boat and there is an error that blocks the
game because is stopped in this day and is thinking all the time without
pass the next day.

Do you know this error?

Otherwise I saw some information where other people wanted to do a better AI and
they were changing the file “startres.json” in the config folder.
In this file you can manipulate the resources that the human or AI
start in the 4 levels of difficult.

Some people recommend to put more resources to the computer like 100.000
of gold.

Do you think that is a good idea to change these parameters to create a competitive AI with more resources?

Thank you so much.

@Trevorin better please provide logs or even a save file if it is reproducable. Is there alliance? I know one bug for allied shipyard when resource are taken from shipyard owner rather than visitor.
My AI will appreciate additional resources. Btw VCMI has cheats.

Great work Nullkiller!
Following with great interest.
Created an account just to post this.
Keep at it!

Hello.
Great work with the AI. Your AI with some extra resources is fun to play with.

However the last stable and working version that does not have crashes for me is the one from 07.02.2021. After that all the version have some problems. I have just tried the one from 17.05.2021 and it crashes with AI turn at some point.

I’m using some mods like Pavilion , Forge, Cove, Courtyard.

Ok. Lets try to solve this mystery. Is it reproducible crash or periodic?

It should be. I’m attaching saved game and it should always crash. I’ve tried four times and it crashed each time on AI turn.

The most important thing is that if I set in launcher AI to VCMIAI then this crashes no longer happen. That is why I connect this problem with your AI.

Mods I’m using is Cove from Hota, Courtyard, Forge, Pavilion town, ban things mod (edited to not ban orginal heroes and do not require wog).

Each mod is slightly edited by me to for example give some function to special buildings in town, but everything was and is working fine in older build.

Also this is random map which is my custom made template, but it should be very alike to Jebuss cross.

VCMI_client.exe_crashinfo.dmp.7z (423.6 KB) Saves.7z (315.9 KB)

Great, will check it. It will take some time to find all these mods so. Could you also check the latest build. I fixed one crash there.

Also if it is your own AI build please provide Nullkiller.pdb file, otherwise crash dump is not much usable.

I’m not using my own builds.

Anyway I have just tried your build from 23.05.2021 and it seems that it is most likely fixed. I fast checked with AI for one week time on 2 generated maps and no crashes there.

Will try to play a full game, and report if it is ok or not but for now I think you should assume it is ok and not waste time on it :slight_smile:

Anyway since there was a question about extra resources I think the good values for your AI are:

// Starting resources, ordered by difficulty level (0 to 4)
{
	"difficulty":
		[
			{
			  "human": { "wood" : 30, "mercury": 15, "ore": 30, "sulfur": 15, "crystal": 15, "gems": 15, "gold": 30000, "mithril": 0 },
			  "ai": { "wood" : 100, "mercury": 50, "ore": 100, "sulfur": 50, "crystal": 50, "gems": 50, "gold": 500000, "mithril": 0 }
			},

			{
			  "human": { "wood" : 20, "mercury": 10, "ore": 20, "sulfur": 10, "crystal": 10, "gems": 10, "gold": 20000, "mithril": 0 },
			  "ai": { "wood" : 150, "mercury": 70, "ore": 150, "sulfur": 70, "crystal": 70, "gems": 70, "gold": 500000, "mithril": 0 }
			},

			{
			  "human": { "wood" : 15, "mercury": 7, "ore": 15, "sulfur": 7, "crystal": 7, "gems": 7, "gold": 15000, "mithril": 0 },
			  "ai": { "wood" : 150, "mercury": 70, "ore": 150, "sulfur": 70, "crystal": 70, "gems": 70, "gold": 500000, "mithril": 0 }
			},

			{
			  "human": { "wood" : 10, "mercury": 4, "ore": 10, "sulfur": 4, "crystal": 4, "gems": 4, "gold": 10000, "mithril": 0 },
			  "ai": { "wood" : 150, "mercury": 70, "ore": 150, "sulfur": 70, "crystal": 70, "gems": 70, "gold": 500000, "mithril": 0 }
			},

			{
			  "human": { "wood" : 0, "mercury": 0, "ore": 0	, "sulfur": 0, "crystal": 0, "gems": 0, "gold": 0, "mithril": 0 },
			  "ai": { "wood" : 150, "mercury": 70, "ore": 150, "sulfur": 70, "crystal": 70, "gems": 70, "gold": 500000, "mithril": 0 }
			}
		]
}

At least that is what I’m using.

I can not change these values directly. Probably it can be changed later with some mods. Or probably such mod already exist. Anyway AI has own routines to acquire resources from map. They are not much effective but it is what I relay on. The only cheat I use for now is vcmieagles to open map. Because exploration routines are much more complicated.

In my spare time, I tested the Nullkiller AI assembly, the assembly is stable, it allows you to play on an XL map for 8 players with installed 80 mods without crashes and crashes of the game

2 Likes

Merged to the main branch

1 Like

Is your AI merged into daily build?

I will release a new town mod Tartarus very soon, hope I can use the new AI for experience.

It is merged.

Sometimes AI is also stupid, I found they still don’t recruit creatures in several weeks, even my troops get more closer to their town.

Did you switch map AI to Nullkiller?
image

Thanks for reminding me, maybe it recovered to original settings.

Enemy still cannot end turns fast I think, hard to play with 8 players at XL maps.

And btw, you can enjoy my new town now!