TheGrandmother/FooStroids

Poor performance

Closed this issue · 5 comments

The current code in this repository does not meet the needs of performance required to run on the FooBox. One advice would be to have the AI on one thread and the clock on an other. As it is now, every time the software has to compute new AI the entire program freezes for entire minutes at worst.

No that is not really the issue. As the code is in the repository now. Only every 100:th tournament gets displayed. So after it has displayed a tournament it runs 100 new tournaments. On a faster computer this is barley noticeable.

And a new AI does not get computed when this happens. The AI is continuously built up. Each time a ship gets new input (Input that it has never encountered before) the decision map gets updated and as time progresses this becomes less and less likely.
A new AI is also constructed when two ships mate. But this happens only once every tournament.

The problem of poor performance is still an issue even though my assumption was incorrect. After it has displayed a tournament the clock freezes for minutes at worst as described earlier. And my advice still stands that the clock should have its own thread to prevent this freeze.

No it doesn't? i recompiled it on the foobox earlier today and it works fine.
But yhea i forgot to create a jar. The new code is now in workspace/fostroids/src on the foobox.

Well, then the new code has fixed that issue ;)

Ninja 👍