AI homework #6 finished