Nullkiller AI

Hi everybody! As somebody might know I work on my own branch of AI for about 2 years. So I want to start some alpha preview. If somebody is interested to try it out and give some feedback you are welcome.

Daily builds are available here:

This AI is not safe compatible with original VCAI for now.

1 Like

You may want to provide direct link. First of all, people won’t see much at all until they log in with Github account or similiar.

Secondly, I can’t find a downloadable either way… this is what I see:

You are absolutely right. Direct link will work better. Here it is
And it does not look like requiring any login

The source code is in the nullkillerAI branch? can it run in Android if I use this branch in vcmi-android?

I am afraid it needs additional stabilization before it can be run on Android

I’ve player whole evening with this branch. AI turns took sooooo long so I’ve only watched ai moves, not tried to battle them.

  • AI doesn’t buy so many useless heroes.
  • AI tries to chain heroes (?)
  • AI seeks for gold mines
  • AI doesn’t gather resources grom ground
  • AI doen’t flag wood and ore mines so I guess it’s not interested with building in towns.

Regarding resources it is a bit reactive. It will start gathering resources when it understands it needs them. Sometimes it flags ore/wood mines in the first turn, sometimes not.
Performance optimization is possible also. I plan to do some parallel calculations. Also pathfinding eats more resources now because of hero chain.

@misiokles have you used a map with mods? Of what size? I have not tested it on big maps yet.

@kdmcser pushed a few fixes for Android. Now it should be more or less stable.

Yeah, with mods. And map was L+U size. Ok, I’ll try sth smaller and lighter :slight_smile:

Got Travis build green. So daily builds for my branch are available here

Hi,my andriod compilation runs well in menu interface, but abort when a new game start. Maybe one of the mods lead to it. But I dont know how to collect the log. Any suggestion about it?

Yes I have one. Have you run python

No, I will have a try. Thank you!

Okay so today I played casually on the “Vial of Life” default scenario on your branch on “easy” level. I played the same scenario last week on develop, so I think I had a pretty good comparison.
So here is my review:
Great Job! Finally VCMI is fun to play even with AI opponents. The AI was exploring the map, developing the towns, engaging in fights when it made sense etc. Of course there are some quirks, but it’s really a huge step forward.

  • Already during the first week I noticed enemy hero exploring the around border
  • I think during week 2 or 3 one enemy was eliminated - I guess by other enemy! (it’s 4 player map, I played 1 human vs 3 computers)
  • There was a reasonable amount of scouts around the map in lategame, stealing my gold mines etc.
  • There were some heroes with challenging armies gathered lurking around or even invading my not-so-strong-defended cities.

I noticed a couple of quirks you might want to know, but please don’t feel discouraged by them. The AI branch is really a huge step forward.

  • There was a situation when I invaded enemy, my hero’s movement range ended just next to his city on weekday 7. And I noticed two scouts (like, “one level one unit” scouts) standing next to the town. I thought - okay, now he’s gonna prepare for the battle and move these scouts away. But on the next day, the situation was just the same, he didn’t even buy any army (although when I think about it now, I’m not sure if he was able to move on day 1, maybe only day 7 after my turn). See screenshot attached.
  • Some hero invaded me much later, instead of attacking my town started exploring and then suddenly locked on an Obelisk. Standing there, in exactly same spot for 7 or more turns until I quit the game.

Again, good job with the AI. Looking forward to further updates.

It is not exploring map now, it just executes vcmieagles for itself on the first day and see everything. Later I might consider exploration but for now it is quite a complex question which I decided to postpone.
Regarding bugs and strange behavior please provide map/save/logs, it helps very much to understand the problem. Otherwise it is hard to tell what is going on. At least save file give a lot of information if I will be able to reproduce the problem.

@Czesiek it would be great if you finish your retreat and surrender logic. I will integrate it to my branch. But no rush. I have a lot other things to do.

Small optimization for big maps. Should work faster now.

I’ve noticed that when AI attacks and wins the battle, game freezes for longer while and beaten defs vanish very sloooooowly…

Probably AI code lacks thread interruption points to give time for UI to render. VCAI has a few and probably I have to add them also. Will add this to my todo list

In VCMI random maps sometimes objects are behind other visitable objects. In this example - to visit War Machine Factory, hero must first visit Obelisk, then Star Axis.
AI heroes often get stuck in such situations. They can visit those three objects, but they can’t go back, because (I guess) they treat once-visitable objects are ‘visited’ so they aren’t interested with way back…