Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions aima/agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -806,8 +806,7 @@ class TrivialVacuumEnvironment(Environment):

def __init__(self):
super().__init__()
self.status = {loc_A: random.choice(['Clean', 'Dirty']),
loc_B: random.choice(['Clean', 'Dirty'])}
self.status = {loc: random.choice(['Clean', 'Dirty']) for loc in locations}

def thing_classes(self):
"""Return the Thing/Agent classes that may populate this vacuum world."""
Expand Down
2 changes: 1 addition & 1 deletion aima/notebook_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def psource(*functions):
from pygments.lexers import PythonLexer
from pygments import highlight

display(HTML(highlight(source_code, PythonLexer(), HtmlFormatter(full=True))))
display(HTML(highlight(source_code, PythonLexer(), HtmlFormatter(noclasses=True, style='monokai'))))

except ImportError:
print(source_code)
Expand Down
Loading