Forward And Backward Reasoning In Ai