In the realm of artificial intelligence and gaming, a riveting study has emerged, applying Q-Learning to a 4x4 Tic-Tac-Toe game. Transitioning from a standard 3x3 model to a more complex 4x4 grid highlighted the significant computational requirements. While the older Intel i9 MacBook Pro could handle 1,000 episodes in an hour, it was the M3 Max MacBook Pro that showcased a remarkable improvement in speed. The utilization of Apple's MLX framework, optimized for their Silicon on Chip GPUs, allowed the same number of episodes to run in merely 7 minutes. Below is a table summarizing the extrapolated runtimes for reaching up to 1 million episodes:
16-inch MacBook Pro | Processor | RAM (GB) | Library | 1000 Episodes (min) | 100000 Episodes (min) | 1 Million Episodes (days) |
Intel i9 | CPU | 32 | NumPy | 60 | 6000 | 42 |
M3 Max | CPU | 64 | NumPy | 13 | 1300 | 9 |
M3 Max | GPU | 64 | TensorFlow | 20 | 2000 | 14 |
M3 Max | GPU | 64 | Apple MLX | 7 | 700 | 5 |
The M3 Max performs exceedingly well using the CPU but performs event better when using the Apple MLX framework. It reduced the run time by almost tenfold from my 16-inch Intel I9 MBP.
You can find the 3x3 Tic-Tac-Toe code created by Ryan Rudes in Google CoLab at:
Comments