Hill Climbing Algorithm Using Python Dictionaries