Improving soccer simulation algorithm

后端 未结 4 612
伪装坚强ぢ
伪装坚强ぢ 2021-01-31 07:00

In another question, you helped me to build a simulation algorithm for soccer. I got some very good answers there. Thanks again!

Now I\'ve coded this algorithm. I would

4条回答
  •  逝去的感伤
    2021-01-31 07:24

    How often are these values going to be checked? If it's going to be in use by a lot of people and constantly recursing over those if/else statements, I can see you eating up a lot of memory and running quite slowly.

    Perhaps you could but a few switches in there to replace some of the if's?

    That's all I can see for speed improvement. As for the algorithm itself, I'll have to peruse over that a bit later if no one else does.

提交回复
热议问题