← Back to team overview

widelands-dev team mailing list archive

Re: [Merge] lp:~widelands-dev/widelands/frisian_balancing_with_ai_hints into lp:widelands

 

> "How are differnt AI players handled? do they think all at the same time?" -
> well, AI has quite a low priority and I dont think the freezes in the game are
> cause by AI, but to better understand the AI timing, look at below code:
> 
> https://bazaar.launchpad.net/~widelands-dev/widelands/frisian_balancing_with_a
> i_hints/view/head:/src/ai/defaultai.cc#L241

thanks I had seen this before.
My understanding is that every computer player (4 in my testsetup - one for each tribe) has its own instance of DefaultAI. So the complete tasks have to be done 8 times a second. And every 5 seconds the stocklevels are recalculated for all buildings. Perhaps the small hickups were caused by another issue, but the question is still if the think cycles of the different computer players should be equalized over time. As you said AI has low priority it maybe possible that the last Ai player can't do his thinking properly if all AI Think cycles are started at the same time.

But maybe I got something totally wrong. Anyhow this should not be done in this branch.
-- 
https://code.launchpad.net/~widelands-dev/widelands/frisian_balancing_with_ai_hints/+merge/347166
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/frisian_balancing_with_ai_hints into lp:widelands.


References