Ai turns

HI, from what i ve read about vcmi… Android is not supported? I downloaded 0.95 version from play.google . Game runs smoothly on my device. I see some minor bugs -most of them are writtenn in your bugtracker:-) but one think i havent found and is a serious problem is - Very long ai turns. It seems it somehow depends on how large is the map and… The time gets longer and longer during the game-because computeer have more and more heroes i guess. By ''very long" i mean 1-10minutes per one computer player. Is this information usefull for you? Can you do something about it? Can i help somehow?

There is a right topic:
forum.vcmi.eu/t/ktora-czesc-heroes-wam-sie-podobala/105/1 … sc&start=0

Yes, AI goes for long. I already asked about it.

No, let’s keep separate topic for this issue.

I would like to hear what CPU does your device have and how long does it take for AI to finish turn on small or medium map.

And to make things clear:
Obviously smartphones are not suited for XL maps with multiple players.

Galaxy S4 is suited:-)
THe problem is that in M/S maps AI is also acting slowly.

I don’t have time right now, but I hope I will find time and make a video of VCMI on S4.

I`ve read topic on 4pda about new android port. There is much positive feedback (even LAN games work, except crash when opponent leaves game) and at the same time nearly all users complaining about AI speed (and also stupidity).

IMHO:
Most of users are original game fans, and they`re comparing VCMI speed on modern mobiles with H3 speed on ancient PCs and expect that if new mobiles are more powerful than old PCs than game should not run slower. They just expect this.

This is because that FAQ thread is now outdated but was not updated yet. Will fix.

And in the same time we have report on HC that there is no way to load saved network game. :slight_smile:

Need some sort of code optimization algorithm is . AI is slow and on desktops . Often the first month of play less , and then ceases to play impossible. Very long turnes . Very high expectations before getting stroke. And by the way a logical question arises , why the new hardware the game runs so the brakes when needed in the original computer:

CPU: Pentium Ÿ 133 , (Pentium 166 recommended)
Memory: 32 Megabytes RAM
Free Hard Disk Space: 320MB Megabytes (minimum) free hard drive space

vcmi work at 4-core processor is slower :smiley:

But you know, VCMI is more advanced. Especially when it comes to AI. The goal was to make best AI possible, not fastest AI possible.

Ano no, AI in H3 used to glitch as well in some situations.

VCMI is a work in process, so more high technical requipments are logical (and modding system, 32bit graphics also requires a lot.
AI is in form of libraries that can be choosen in Launcher (only on PC, not on Android now). I think it will be good if more weightened version will be also available (to use on old PCs, smartphones etc).

Noble intentions, but at the moment the goal is no reached. And to tell you the truth, he does not play so well, so long turn.
Yes, and stronger than the original, too, does not play.
And about the failures I did not say anything and did not mean.

I just wanted to say that maybe there is any bottlenecks, because that is what is happening. And it can be repaired.

My device- sony xperia pro mk16i : 320MB accessible RAM, cpu: 1024MHz Qualcomm snapdragon S2 MSM8255. -Hope its enough. I had some time to try a little more and it seems that size of a map doest matter so much. I tried XL map and first turn take computers about 30sec. But it gets longer and longer each next turn. I was able to finish small map once and i saw that computer behaved strange, he was really just spamming heroes. He didnt have single powerfull hero not even close, but when i was getting close to his castle he had there maybe 10 heroes and building more every turn. -Regular small map, 2nd dificulty(default) . Btw-when a computer plays its turn his hero doesnt move fluently. It seems like he does one move to some direction, than calculate what to do next(1sec maybe) and then move and again and again. Maybe this and the fact that he creates so many heroes cause the problem… I can test more, but you have to tell me what :mrgreen:

To be clear… Even a whole 1minute for a computer’s turn would be aacceptible for me:-P but it gets much longer than that. On other platforms there havent been that kind of issue? Its only android thing?

By “other plaforms” we mean PC with quad-core processor and large Cache, where AI can play multiple turns per second. But it doesn’t mean that Android system or different processor architecture can’t be a source of trouble itself. Someone would have to sit down with smartphone and profile AI behavior.

Spamming heroes is normal as long as they have anything to do. BTW, I tested AI mostly on random maps with tournament templates.

This is how it works and how it has to be. Each AI movement can change state of game. It we don’t want it to stall or stay locked on outdated objective, it needs to recheck state of game on every step.
Of course some smart caching would help, but it’s difficult to implement.

I do not plan to improve AI in following weeks, apart from fixing obvious bugs and loopholes.

AMD Phenom 960T x4

1 turn - 46 minute 35 second!

This is not normal
log.rar (2.55 MB)
Games.rar (643 KB)

You do not want to listen to me. But if the AI ​​to allow the entire map, it is very much reduced and saved time for exploration. imho

Talk to Tow about that. He strongly inists to allow players (including AI) to know much less than they know now to prevent cheating in multiplayer.

Or to put it in another way: the fact that AI can’t see entire map does NOT belong to AI part, so I can’t do anything about it.

BTW, Your savegame is incomplete.

Log clearly says that the issue is one hero trying to visit another and trying to get army from it while it’s impossible.
I tried to fix that many times, but still doesn’t work, have no idea what are the correct conditions to check :confused:

Again, this has nothing to do with Android performance.

I propose to make option in defaultMods, like AI_MAP_EXPLORED=false.
This will make thing optional and users can set it if they like to.

Tow, what do you think?

AI should not circumvent the AI interface by trying to access the game state and retrieving the normally unavailable information. I don’t mean that AI must never receive such information. I say that if we decided to have cheating AI, the cheating needs to be a part of AI interface. If server knows about it and priviliges AI, then all is well with the world and safe-MP even if AI cheats.

Still, it is as Warmogner said — cheating is not a feature to be coded on the AI side, it is the engine that would need to differentiate which information will be given to AI and which to human players.

However, the whole discussion seems moot to me. I have not seen any evidence that it is the exploration algorithm that causes such long AI turns. When optimizing, it is necessary to first identify, where the time is actually spent. Then, it is possible to discuss about solutions.

Now it is just guessing. It should be possible to check this, even without being a developer. Try taking a map that AI spends incredibly long turns, giving AI a Tower castle with grail (=explored map) and checking how much faster it is?

I don’t think there exists any Android-specific issue. AI can get terribly slow even on modern PC, on Android it just even more visible.


One more question: How the current AI speed compares to the AI from the 0.94 release?

Better to find out the reason for the slow work, and fix it. Than to revert to the previous version. All the same, he plays a bit better.

I cheked it