Student Handout:
Troubleshooting Guide for PacMan Part III
Common Problems:
-
Is your Controller agent saved on the world?
-
Did you type in @pellets whenever the simulation property was checked or changed?
-
Do you refer to the correct agents in each step?
Polling and Broadcast
Another Approach to Troubleshooting:
Make a quick check on how many Pellets are in the World:
Click on the gear button on the upper right side of the AgentCubes Online window and select “Show simulation Properties”. This window will appear:
The correct number of Pellets will not appear in this window until you have single-stepped (click on the black triangle
next to the stop and go buttons) or briefly run the game. If your programming is correct, the value of Pellets will decrease by 1 each time PacMan eats (erases) a Pellet. When the value of Pellets is equal to 0, PacMan should win the game.
More detailed troubleshooting:
To determine what is happening in your game, it is helpful to look at how the simulation property changes over time. Add the plot to window action to the rule in the Controller’s while running method. Fill it out as it appears below:
In the plot to window action, you must name the simulation property to be plotted (Pellets), name the window where it will appear (Pellets Plot), say what it represents (number of pellets) and pick the color of the line that will appear on the graph.
Note that you must put “@” before the Pellets in the plot to window box because you are checking the value of the simulation property Pellets!
Student Handout 4b:
Move Continuously
Make the PacMan move until the end of the row of pellets
PacMan Moves Continuously
Challenge
Before your start this challenge:
You must have a complete basic PacMan game with a PacMan who wins if he eats all the pellets and Ghosts who either move randomly or chase the PacMan. The PacMan loses if a Ghost gets too close. The world should have walls that the Ghost and PacMan cannot cross.
You must have 4 different shapes for the PacMan so that he faces the direction he heads.
Description of the Challenge:
PacMan will continuously move in the direction he’s heading.
This challenge gets you started, but won’t give you all the code. Review the code below: It says, when the right arrow is pressed AND I do not see a wall to the right, change to the right-facing depiction. Once every 0.2 second, make me (the PacMan) do “move continuously”.
When the move continuously method is called, the PacMan does the following:
If I see myself heading right AND I do not see a wall in the right direction, I will move right.
The effect of the rule in move continuously is to make PacMan keep moving whichever way he is facing as long as there are no walls in the way.
There is still much to code:
Step 1:
Create code for all the other directions.
Step 2:
Test your program. (Hint: be sure your PacMan still leaves his scent everywhere.)
Click on the PacMan with the big arrow tool to select him and run the program.
Use the colors to decide which rules are true or false. In this case, the first rule is red, which means the Right arrow was not pressed or a wall was in the way.
The next rule is green, which means every 0.2 seconds, the PacMan is being told to do MoveDirection.
The method MoveDirection is green, which means that either or both conditions are true. The PacMan does sees his right-facing shape AND does not see a wall, making the rule TRUE, so PacMan will move one step to the right.
Student Handout 4c:
Power Pellets
Make a Power Pellet that allows the PacMan to eat the ghosts.
Power Pellet
Challenge
Before your start this challenge:
You must have a complete basic PacMan game with a PacMan who wins if he eats all the pellets and Ghosts who either move randomly or chase the PacMan. The PacMan loses if a Ghost gets too close. The world should have walls that the Ghost and PacMan cannot cross.
You must have different depictions of the PacMan so that he faces the direction he heads, and he must move continuously.
Description of the Challenge:
-
Power Pellets are added to the world.
-
Power Pellets provide PacMan with the temporary ability to eat the enemies. The enemies turn deep blue, and reverse direction.
This challenge gets you started, but won’t give you all the code.
To help you think this through…
-
You will need a new agent (Power Pellet)
-
Do you need a new agent or a new shape for the blue ghost?
-
When the ghost chases the PacMan, PacMan has a scent of 1000. What happens if he has a scent of -1000? How can you set that new scent?
-
How can you limit the time that PacMan’s scent is -1000? Could you create a timer agent that starts counting when it receives a message from PacMan that he ate a Power Pellet? The timer agent should send a message back to PacMan when it is done counting and it’s time for PacMan’s scent to return to 1000.
-
Hint: Use the hill climbing action rather than all the code for sniffing.
Student Handout 4d:
Next Level
Make a second level for your PacMan!
Next Level
Next Level!
Challenge
Before your start this challenge:
You must have a complete basic PacMan game with a PacMan who wins if he eats all the pellets and Ghosts who either move randomly or chase the PacMan. The PacMan loses if a Ghost gets too close. The world should have walls that the Ghost and PacMan cannot cross.
You must have different depictions of the PacMan so that he faces the direction he heads, and he must move continuously.
Description of the Challenge:
-
When the game ends, a new level appears, even harder than before!
This challenge gets you started, but won’t give you all the code.
To help you think this through…
-
Do you need a new agent? A new world?
-
When would a new level appear?
-
What code needs to change to make the new level appear?
You might have a rule like this:
How could you use this condition
and this action
to let the player move from a world named “Level 1” to a world named “Level 2”?
Very Important Note: Add another rule that
stops the simulation if the player has won Level 2
so the game ends!
ISTE Standards5 specific to the implementation of PacMan (Denoted with ())
|
Creativity and Innovation
|
|
Students demonstrate creative thinking, construct knowledge, and develop innovative products and processes using technology. Students:
|
|
|
Apply existing knowledge to generate new ideas, products, or processes:
|
|
|
|
|
Design and develop games
|
|
|
|
|
Design and develop computational science models
|
|
|
Create original works as a means of personal or group expression.
|
|
|
|
|
Design original games
|
|
|
|
|
Model your local environment, e.g., ecology, economy
|
|
|
Use models and simulations to explore complete systems and issues.
|
|
|
|
|
Model scientific phenomena, e.g., predator / prey models
|
|
|
|
|
Create visualizations
|
|
|
Identify trends and forecast possibilities.
|
|
|
|
|
Build predictive computational science models, e.g., how the pine beetle destroys the Colorado pine forest
|
|
|
|
|
Build live feeds to scientific web pages (e.g., weather information), process and visualize changing information
|
Communication and Collaboration
|
|
Students use digital media and environments to communicate and work collaboratively, including at a distance, to support individual learning and contribute to the learning of others. Students:
|
|
|
Interact, collaborate, and publish with peers, experts, or others employing a variety of digital environments and media:
|
|
|
|
|
Students work in teams to build and publish their simulations as web pages containing java applets.
|
|
|
Communicate information and ideas effectively to multiple audiences using a variety of media and formats.
|
|
|
|
|
Effectively combine interactive simulations, text, images in web pages
|
|
|
Develop cultural understanding and global awareness by engaging with learners of other cultures.
|
|
|
|
|
Students and teachers from the four culturally diverse regions interact with each other
|
|
|
Contribute to project teams to produce original works or solve problems.
|
|
|
|
|
Define project roles and work collaboratively to produce games and simulations
|
Research and Information Fluency
|
|
Students apply digital tools to gather, evaluate, and use information. Students:
|
|
|
Plan strategies to guide inquiry.
|
|
|
|
|
Explore web sites and identify interesting connections
|
|
|
Locate, organize, analyze, evaluate, synthesize, and ethically use information from a variety of sources and media.
|
|
|
|
|
Find relevant related web-based information, compute derivate information
|
|
|
Evaluate and select information sources and digital tools based on the appropriateness to specific tasks.
|
|
|
|
|
Understand validity of information, e.g. Scientific journal information vs. Personal blogs
|
|
|
Process data and report results.
|
|
|
|
|
Write programs to access numerical information, define functions to process data and create output based on voice or plotting to represent data.
|
Critical Thinking, Problem Solving, and Decision Making
|
|
Students use critical thinking skills to plan and conduct research, manage projects, solve problems, and make informed decisions using appropriate digital tools and resources. Students:
|
|
|
Identify and define authentic problems and significant questions for investigation.
|
|
|
|
|
Define research questions and explore approach of exploration
|
|
|
Plan and manage activities to develop a solution or complete a project.
|
|
|
|
|
Outline sequence of exploratory steps
|
|
|
|
|
Experience complete bottom-up and top-down design processes
|
|
|
|
|
Employ algorithmic thinking for creating programs to solve problems
|
|
|
Collect and analyze data to identify solutions and/or make informed decisions.
|
|
|
|
|
Collect data as time series, e.g., collect group size of predator and prey, export time series to excel, explore various types of graph representations, e.g., x(t), y(t) or scatter y=f(x)
|
|
|
Use multiple processes and diverse perspectives to explore alternative solutions.
|
|
|
|
|
Experience and understand design trade-offs, e.g. Bottom-up vs. Top-down
|
Digital Citizenship
|
|
|
Students understand human, cultural, and societal issues related to technology and practice legal and ethical behavior. Students:
|
|
|
Advocate and practice safe, legal, and responsible use of information and technology.
|
|
|
|
|
Learn how to use tools to locate resources, e.g., images with Google image search, but understand copyright issues
|
|
|
Exhibit a positive attitude toward using technology that supports collaboration, learning, and productivity.
|
|
|
|
|
Stay in the flow, where design challenges match design skills
|
|
|
|
|
Experience success through scaffolded game design activities
|
|
|
|
|
Mentor other students
|
|
|
Demonstrate personal responsibility for lifelong learning.
|
|
|
|
|
Explore options of going beyond expected learning goals
|
|
|
Exhibit leadership for digital citizenship.
|
|
|
|
|
In a collaborative setting become a responsible producer of content for diverse audiences
|
Technology Operations and Concepts
|
|
Students demonstrate a sound understanding of technology concepts, systems, and operations. Students:
|
|
|
Understand and use technology systems.
|
|
|
|
|
Know how to organize files and folders, launch and use applications on various platforms
|
|
|
Select and use applications effectively and productively.
|
|
|
|
|
Know how to orchestrate a set of applications to achieve goals, e.g., make game and simulations using Photoshop (art), AgentCubes Online (programming), and Excel (data analysis).
|
|
|
Troubleshoot systems and applications.
|
|
|
|
|
Debug games and simulations that are not working
|
|
|
Transfer current knowledge to learning of new technologies.
|
|
|
|
|
Reflect on fundamental skills at conceptual level. Explore different tools to achieve similar objectives.
|