aimacode / aima-python

Python implementation of algorithms from Russell And Norvig's "Artificial Intelligence - A Modern Approach"
MIT License
7.97k stars 3.76k forks source link

Fix bug in all_events #1274

Open yangchenyun opened 1 year ago

yangchenyun commented 1 year ago

In case any variables exist in e, the former implementation would generate wrong results.

all_events("Alarm", alarm_net, {"Earthquake": F}) # before, would yield event with E: F