This is a demo I wrote to visualize the AKS algorithm. Of course it is not optimized, especially the polynomial calculations. Therefore, the speed is not as fast as other methods.
But it is a good way to understand the algorithm.