Code from COMP590-125 Artificial Intelligence