JS code runs slow on codepen, though it runs good locally

前端 未结 1 389
余生分开走
余生分开走 2021-01-27 07:46

I have implemented minimax algorithm for an unbeatable tic toc toe game. The minimax algorithm is recursive, performing big iterations, which are not big for the computer, only

相关标签:
1条回答
  • 2021-01-27 08:18

    Use a profiler to pinpoint where the code is slow.

    Here's the profiler result using Google Chrome.

    The problem seems to start from the function minimaxMove.

    0 讨论(0)
提交回复
热议问题