nicupavel / openpanzer

Javascript/HTML5 rewrite of Panzer General 2 game
http://panzermarshal.com
154 stars 39 forks source link

AI fog of war #249

Closed Greyfoot9x19 closed 3 years ago

Greyfoot9x19 commented 4 years ago

I've posted this on fb already, I am aware it's xmas and all but here it comes anyway.

Been playing on android and browser and noticed that the AI has no fow, it does not obey spotting ever. Tested it with different difficulty, campaign/scenario.

nicupavel commented 4 years ago

I'll change this in the next update.

salexgit commented 4 years ago

Hi

I noticed the same issue, but I was assuming that it is not a bug but a feature. AI can always see all the units to behave smarter being comparable with a human player. One of the most eloquent examples is that AI would always send an air unit to attack your bridge engineers standing on the river in the "bridge" mode. Making AI obeying fog of war will make it more realistic but will of course complicate AI implementation.

Regards, Alex

Greyfoot9x19 commented 4 years ago

Alex, I agree that it does help the ai, however campaigns can be made hard-and some already are-so I think it is not needed if it is a feature indeed.

My biggest concern is that this thing renders half the tactical element of the game useless, for example artillery transport is a pain, they need to be boxed in and under constant air support. Also protection against out of the sun and surprise leaders are useless for the ai as they almost never happen. I said almost because once it did happen with me, I think in the US campaign, some panzers got surprised in the desert, I have no idea how that happened.

Anyways I think fow is/was a strong point of the original game, made recon units(and hunting them) more valuable.

salexgit commented 4 years ago

Hi

I do agree with all the observations you made. The only point I tried to make is that enforcing fog of war for AI will require non-trivial efforts. As you noted, AI will have to learn how to: manage recon units (move them to the areas where the attack is planned, protect them), cope with a situation when recon units are not available, etc. As usually, things might look simple on paper but will definitely get more complex in the implementation. There is only one active code developer, so Nicu can decide himself whether it is a trivial effort or not :)

barsoom1717 commented 4 years ago

AI obeying fog of war rules would make the game 100 fold more realistic.  But since I'm not the one doing the coding, I leave it up to the developers to decide if it is worth the effort. Stephen On Friday, January 3, 2020, 1:23:25 PM CST, salexgit notifications@github.com wrote:

Hi

I do agree with all the observations you made. The only point I tried to make is that enforcing fog of war for AI will require non-trivial efforts. As you noted, AI will have to learn how to: manage recon units (move them to the areas where the attack is planned, protect them), cope with a situation when recon units are not available, etc. As usually, things might look simple on paper but will definitely get more complex in the implementation. There is only one active code developer, so Nicu can decide himself whether it is a trivial effort or not :)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

salexgit commented 4 years ago

Hi

Just for information, the following link describes how AI handles (recon) units in the OpenGeneral game. I hope it will help developers. http://luis-guzman.com/OpenGen_AI.html

Regards

Philip799 commented 4 years ago

this game works on classic pz2/open panzer. @nicu do a many things that game was a new face. some things I think cannot be changed, and many would be added in future. Split game to 3 parts was a good idea

Matimbo commented 4 years ago

My issue with AI is that it hunts down weakened air units to kill them. If one of my core bombers is severely weakened and I don't have the points to rebuild during the game, I try to fly it to the most remote area of the board away from any enemy observation. While it doesn't always happen, the AI has sent a fighter unit to hunt the bomber down with some magical power of observation.

Philip799 commented 4 years ago

I was writed about this, that AI can spot units in fog of war. That is old bug from PG2 times.

salexgit commented 4 years ago

Hi

@Matimbo: Yes, I noticed the same AI behaviour (which is well explained by the fact that AI can see all the units). And as I noted earlier, AI will (almost) always send an aircraft to attack bridge engineers. Ironically enough, knowing such a predictable AI behaviour you can always exploit it:

Anyway, introduction of AI fog of war would definitely make game more realistic at the cost of making developer life more complex.

Matimbo commented 4 years ago

Thanks for the suggestions on protecting bombers from roving AI, I will try the flak trap that usually exists in the late-war scenarios when I have had a chance to build out the AA units. It may still be a problem early war when there aren't mobile flak units that can shadow the artillery.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.