Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
COSC350_550_workshops
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jonathan Vitale
COSC350_550_workshops
Commits
adb8772b
Commit
adb8772b
authored
1 year ago
by
Jon
Browse files
Options
Downloads
Patches
Plain Diff
Add __name__ == __main__ statement
parent
1da4eefc
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
week2/solution/code/vacuum_world.py
+3
-2
3 additions, 2 deletions
week2/solution/code/vacuum_world.py
with
3 additions
and
2 deletions
week2/solution/code/vacuum_world.py
+
3
−
2
View file @
adb8772b
from
une_ai.vacuum
import
VacuumGame
,
DISPLAY_HEIGHT
,
DISPLAY_WIDTH
from
agent_programs
import
simple_reflex_behaviour
,
model_based_reflex_behaviour
,
goal_based_reflex_behaviour
,
utility_based_reflex_behaviour
# To test the different agent programs, change the function passed as parameter to create the instance of VacuumGame
game
=
VacuumGame
(
utility_based_reflex_behaviour
,
DISPLAY_WIDTH
,
DISPLAY_HEIGHT
)
\ No newline at end of file
if
__name__
==
"
__main__
"
:
# To test the different agent programs, change the function passed as parameter to create the instance of VacuumGame
game
=
VacuumGame
(
utility_based_reflex_behaviour
,
DISPLAY_WIDTH
,
DISPLAY_HEIGHT
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment