Page 4 of 7

Re: Rise of AI Global Mod v3.0

Posted: Tue Dec 01, 2020 9:10 pm
by roguedjack
Phoenix100 wrote: Tue Dec 01, 2020 8:37 pm But you mentioned 'debug mode', Roguedjack. I don't see that in the options. Where do i find it and how do I switch it off? Thanks.
Don't worry it's off by default, it's in a file you have to edit to switch it on.

Re: Rise of AI Global Mod v3.0

Posted: Tue Dec 01, 2020 9:42 pm
by Phoenix100
Mmm. But the 'system' txt file in the config folder, for example, shows

//debugmode = 1
and
//debugdisplay = 1

But do those little '//' marks mean this doesn't apply?

Re: Rise of AI Global Mod v3.0

Posted: Tue Dec 01, 2020 10:09 pm
by roguedjack
Phoenix100 wrote: Tue Dec 01, 2020 9:42 pm Mmm. But the 'system' txt file in the config folder, for example, shows

//debugmode = 1
and
//debugdisplay = 1

But do those little '//' marks mean this doesn't apply?
Yes those lines don't apply.

Re: Rise of AI Global Mod v3.0

Posted: Wed Dec 02, 2020 8:19 am
by rbodleyscott
Phoenix100 wrote: Tue Dec 01, 2020 8:37 pm But you mentioned 'debug mode', Roguedjack. I don't see that in the options. Where do i find it and how do I switch it off? Thanks.
If you haven't added it to your USER.TXT file, you probably don't have it turned on.

As far as I know it isn't in the Options file, it is in the USER.txt file in /Documents/My Games/FieldOfGlory2

If your USER.txt file does not have DEBUGMODE 1 in it, you don't have it on.

Re: Rise of AI Global Mod v3.0

Posted: Wed Dec 02, 2020 11:11 am
by Phoenix100
Thanks, Richard. It's not in the User.txt file, no.

Re: Rise of AI Global Mod v3.0

Posted: Mon Dec 14, 2020 11:26 am
by Phoenix100
You mentioned some kind of update, Roguedjack, helping with the stutters. Is that available somewhere? Keen to use the mod now.

Re: Rise of AI Global Mod v3.0

Posted: Mon Dec 14, 2020 1:19 pm
by roguedjack
Phoenix100 wrote: Mon Dec 14, 2020 11:26 am You mentioned some kind of update, Roguedjack, helping with the stutters. Is that available somewhere? Keen to use the mod now.
Not yet. Will be in the next version 3.1 which I'll release soon after the next Fog2 patch.

Re: Rise of AI Global Mod v3.0

Posted: Mon Dec 14, 2020 3:27 pm
by Phoenix100
Ok. Thanks. What's the prognosis on that, do you know?

Re: Rise of AI Global Mod v3.1/v3.0

Posted: Tue Jan 12, 2021 3:23 pm
by roguedjack
New version 3.1 is now available. See the first post.
Here are the changes :
WHAT'S NEW
Stuttering fix and some optimizations that in some cases slightly decrease AI turn time.

- Fixed most cases of AI movement animation stuttering (this was a problem of the mod, not the game).
- Optimization : AI will end its turn early when it thinks it has nothing to do anymore instead of going through all the remaining passes.
- Optimization : When building the list of AI units for the pass the AI will skip units that have nothing to do anymore.
- Compatibility for Fog2 1.5.34

Re: Rise of AI Global Mod v3.1/v3.0

Posted: Tue Jan 12, 2021 3:25 pm
by MarkShot
Thank you very much!!!

Re: Rise of AI Global Mod v3.1/v3.0

Posted: Tue Jan 12, 2021 7:44 pm
by spinocus
Excellent, thank you.

P.S. I think you are a very special person.

Re: Rise of AI Global Mod v3.1/v3.0

Posted: Tue Jan 12, 2021 9:53 pm
by KKarlssoNN
Big thanks... time to jump back into the game!

Re: Rise of AI Global Mod v3.1/v3.0

Posted: Wed Jan 13, 2021 2:37 am
by Ray552
Works great, thank you for your hard work!

Re: Rise of AI Global Mod v3.1/v3.0

Posted: Wed Jan 13, 2021 11:05 pm
by toska
Thanks for addressing the processing time, it is now very well playable.

Re: Rise of AI Global Mod v3.1/v3.0

Posted: Thu Jan 14, 2021 12:09 am
by Swuul
Excellent!

Re: Rise of AI Global Mod v3.1/v3.0

Posted: Wed Jan 20, 2021 7:03 am
by KKarlssoNN
After playing some more and on bigger maps, I must say its much improved, still minor stutters and some freezing but totally playable. Muchly appreciated!

Is there anymore room for improvements? Is it even worth it? Would it for sure cut into AI performance?

Re: Rise of AI Global Mod v3.1/v3.0

Posted: Wed Jan 20, 2021 1:58 pm
by roguedjack
Nice.
KKarlssoNN wrote: Wed Jan 20, 2021 7:03 am Is there anymore room for improvements? Is it even worth it? Would it for sure cut into AI performance?
The only major feature left untouched is AI army composition. The AI could possibly be smarter when buying units by taking into account the map terrain and the player army list. On one hand this would presumably increase the challenge. But on the other hand this would make the AI army composition much more predictible. If the AI army composition becomes too "reasonable" it will also become less fun. Part of the enjoyment of playing vs the AI comes from sparring rather than competing. So I'm on the fence about it. It would have a minor impact on performance as it would all happen before the player force buy and deployment.

Ideally I'd like to keep improving AI units coordination on tactics, group cohesion when manoeuvring and terrain understanding, but I have no concrete ideas on how to do that currently and this would certainly have a significant impact on performance.

Then there are the usual tweaks on heuristics values which may improve play if I find the right combination of magic numbers, for no impact on performance.

Re: Rise of AI Global Mod v3.0

Posted: Wed Jan 20, 2021 6:58 pm
by mariamarie
roguedjack wrote: Mon Nov 02, 2020 1:56 pm Thanks for the feedback.
MarkShot wrote: I realize you probably don't have much systems level control (like thread creation and destruction). I am not sure if you are familiar with how standard (non-neural net) chess engines are coded:
* You use the player's think time to keep processing. So, if done as a low priority thread, it should not impact the UI or the player's turn.
* You keep transposition tables (as there a multiple ways to arrive at the same board). You need to interrupt and restart the walk through the solution space each time the player moves. But ultimately 50% of calculations done on the player's turn may yield valid moves.
* As the player get closer to his last move, and may even stare at the board games like Crokinole Table a while after the last move (as there are no clocks), you do have a final state.
Applying the above techniques, you might be able to bury much of your increased computational overhead into the player's own turn.
I'm famliar with chess engines and I'm afraid we can't do that. As you said we can't create thread from script, so thinking on player time as in chess engines is not possible.

The AI engine is not search based, It is utility function/heuristics based so TTs wouldn't be useful. Right now the only things ressembling search are things like scanning around targets for the best shooting spots/flanking position using the game engine pathfinding (basicaly a depth=1 search limited in space and scope). In general caching results is not as useful as in TB classic games as the game state is too volatile even during the AI own turn and that invalidates like 99% of cached results.
I do a bit of optimizations though. I cache the threatmap for the current AI unit so it doesn't always get recomputed when the AI needs it again (not very useful as noted previously but it is here).
I also avoid some computations when the AI found out it has nothing to do anymore, but I can't make the AI end its turn when it wants to. It has to go through the number of passes it requested at the start of its turn even when not making any use of it. So a lot of the AI time near the end of its turn is spent in basically saying "i don't want to do anything anymore with this unit" for each units. Talking about it gave me a couple of ideas to shorten the AI turns, I'll see.
nikossaiz wrote: I have a quite high end pc and used to have the same issue also with the 2.4 version
after i verify/repair the game files ( i play on gog version ) and reanable yuor mod the statter reduced significantly till the state that i rearly have an issue ( smaller delays still happen ). since it worked for me may work for other players also. I will do it again with the 3.0 version to see if this is the case.
Cool if that helps other people.

Facing same issue.

Re: Rise of AI Global Mod v3.1/v3.0

Posted: Thu Jan 21, 2021 7:20 am
by KKarlssoNN
Question... cranking up the graphics to max, namely AA and shadows, shouldn't make said issues worse... correct? Or enough to notice? I have almost the best you can buy for a gaming pc from a couple years ago.

This mod should only effect CPU performance, to my understanding.

I cranked it up and I cant tell the difference, maybe just a wee bit, may be imagining things though.

Re: Rise of AI Global Mod v3.0

Posted: Thu Jan 21, 2021 1:13 pm
by roguedjack
mariamarie wrote: Wed Jan 20, 2021 6:58 pm
nikossaiz wrote: I have a quite high end pc and used to have the same issue also with the 2.4 version
after i verify/repair the game files ( i play on gog version ) and reanable yuor mod the statter reduced significantly till the state that i rearly have an issue ( smaller delays still happen ). since it worked for me may work for other players also. I will do it again with the 3.0 version to see if this is the case.
Facing same issue.
Did you try version 3.1 ?

KKarlssoNN wrote: Thu Jan 21, 2021 7:20 am Question... cranking up the graphics to max, namely AA and shadows, shouldn't make said issues worse... correct? Or enough to notice? I have almost the best you can buy for a gaming pc from a couple years ago.

This mod should only effect CPU performance, to my understanding.

I cranked it up and I cant tell the difference, maybe just a wee bit, may be imagining things though.
I can't confirm, ask the game developpers.