You will build the inference engine of a tiny expert system that identifies a bird from facts the user gives.
Your tasks.
fire_once, go through rules in order. For the first rule whose needed facts are all in facts and whose conclusion is not yet in facts, add the conclusion to facts and return True. If no rule can fire, return False.fire_once again and again until it returns False, adding each new conclusion to the list fired in order.answer to the most specific conclusion: the last item of fired.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…