Adventure AI - plans and challenges

No.
Function isAccessibleForHero relies on CGPathNode::reachable that returns true when the path between target and hero is fully cleared. So any removable (blockvis) objects, neutral monsters zone of control and similar obstacles will make map areas unreachable.
The only exceptions are monoliths, boats and subterranean gates — pathfinder is now smart enough to use them.

This is why VCAI has concept of Sector — set of tiles that would if reachable if guards/visitable objects would be passable.

Ahh, so that’s why AI gets lost sometimes and does not advance. Will need to find a way to implement it correctly.

Still, if AI is already quite effective, it will get really smooth once this severe issue is fixed :slight_smile:

Okay, it’s ready. I’m sure you will love new AI performance, especially on random maps :slight_smile:

An endless loop during AI turn. Just finish your turn and have fun.
Games.tar.gz (1.01 MB)

I have a proposal to “teach the AI ​​to” improve archers and elves to the software level.
No tears can not see when he runs from 40-50 not improved eg elves. And it would be healthy if he tried to improve in the second week of the game while playing vampires necropolis.
Raise the priority of these buildings were used very well.

Cool, but there is no “priority” at all. AI simply builds first building from the list each turn.

Currently my aim to to improve AI enough to clear Jebus. In fact, it already can succeed at this :slight_smile:

Will check.

Norms of output to the center by Jebus ~ 123, 124. AI now knows that too? :smiley: :smiley:

I played map on Android.
My hero went near enemy castle (there were no units left to buy in it). My hero was not strong (5 nixes and some low-level gang). Enemy hero near the castle altrough went by his business, And I took castle without fight.
This seems to be not realized branch of decision for enemy hero?

Is it so now?
I have a suggestion that AI must try to build buildings for shooters and high level monsters first. Even if AI is given lot of resources, he still will buy low level first (as I checked on Android game).

Another issues in AI logic:

  1. AI almost never retakes mines and dwellings taken from him by me.
  2. AI rare attacks my heroes, even if they stand in 1-2 hex from his hero and even they are base army heroes very weak.

Looks like a AI bug.
After my first turn on map “Thousand Lakes” violet player gone to loop (I didn’t wait more than 2 minites). Looks like it tries to go to hex it already stands.

Offered in the exploration map, do the following.
When you buy a hero to leave it on the fastest creature. For example bought hero with centaurs and gnomes. Leave the army in the city - the dwarves and centaurs, stay on the 1 centaur and then run to scout the map.
(more movement points the next day)

When he bought the hero to start the army left the city to strengthen the protagonist. How will it be determined you know better. But when the first hero ran with the starting army for exploration, then a second hero ran with the starting army to explore, and then a third character too stingy and went to explore - it’s bad. It is necessary to keep the army in one powerful fist. Especially at first, so much more penetrative ability.

For example, this saves. We look at the brown.
1 Bought a lot of heroes for exploration - this is good.
2 How did he do it - bad. Hero Jam - with starting troops.
3 Hero Elllshar - with starting troops.
4 There is a hero Gelle with large parameters, but the army is in Bron.
5 Hero Alamar daily visits tent - ?? If we combine the whole army and give it Gelle, yes improve elves snipers - that dogs in the tent could have used to break.
6 Krellion, Tamika, Gundula just inactive. Bad.
example.rar (663 KB)