Page 1 of 1

OpenCL fastest path algorithm

Posted: Mon Jul 31, 2023 2:27 pm
by Elefant
Operating under the idea that finding the fastest route for a unit is what takes the most time between turns, I had idea. The algorithm is probably composed mostly of math done over and over again, making it an ideal use case for GPU compute. By handing the math over to the GPU, the GPU's massive parallel compute advantage could be utilized for a large speedup. Even an integrated GPU has more mathematical power than a single cpu core. And OpenCL can be run on the cpu if there is no GPU present. I don't know exactly how much faster OpenCL would be, but worst case scenario it would at least automatically multi thread the code. Maybe this could speed up the AI, especially on large maps with lots of units?