Computational Thinking Patterns Revised

This page shows revised computational thinking patterns (Kyuhan)

• Directional Movement: The agents are moving into the predefined direction.

directional.flv

• Random Movement: The agents are moving randomly. random.flv

• Cursor Control:This is the most basic pattern in game design. The users can control/move their agents with arrow keys or any other keys.



• Generation: This pattern is one of the most common situations found in many games. To satisfy this pattern, an agent is required to generate a flow of other agents; for example, a bullet leaving a gun (ie: the gun agent generates a flow of bullets), a car appearing from a tunnel, or an airplane shooting a missile are all examples of generation. Generally, the generator, an agent creating other agents, generates an agent next to itself (up, down, right or left) with certain probability and time frequency. Upon generation, the generated agent usually moves away from its generator (i.e. a bullet moving away from a gun).





• Absorption: This is the opposite pattern of generation. Instead of an agent generating other agents, an agent absorbs a flow of other agents in the absorption pattern (i.e. a tunnel absorbing cars). Usually, the absorber, an agent absorbing other agents, absorbs an agent next to itself.



• Collision: This pattern represents the situation when two agents collide. This pattern happens when an agents is next (up, down, right or left) to a target agent. For example, a bullet or a missile hits a target creates a collision situation wherein the agents must react to being collided with. In the game Space Invaders, for example, if a missile hits the cannon, the cannon must be “destroyed.”







• Transportation: Transportation is unique and crucial for creating games. This pattern represents the situation that one agent carries another agents as it moves. For example, a dropship in StarCraft can carry marines, or a turtle in Frogger can carry a frog on it. This pattern happens when one agent is stacked over another agent and the stacked agent is carried with the bottom agent as the bottom moves.



• Push: Push pattern is the pattern we see in the game of Sokoban. A player in Sokoban is supposed to push boxes to cover targets. As the player pushes the box in Sokoban, the box moves toward direction (up, down, right or left) it is pushed. The box in Sokoban should be moved only if it is pushed toward a regular ground tile or a target spot. Therefore, if an agent that is supposed to be moved is blocked by other agents in the direction of the push then neither the agent being pushed nor the pusher agent should move.

push2.flv

• Pull: This pattern is the opposite pattern of push. An agent can pull another adjunct agent or any number of agents serially connected to the puller. For example, you can imagine that a locomotive pulls a large number of railroad cars. In this situation one agent, the pulling agent, can pull one or more agents that are connected to itself.

• Diffusion: You can diffuse a certain value of an agent through neighboring agents with a diffusion pattern. For example, a torch agent can diffuse the value of heat through neighboring floor tile agents. The closest eight neighboring floor tile agents to the torch agent will have the highest value of heat, and tile agents that are further away from the torch agent will have a lower heat value.

 

• Hill Climbing: Hill climbing is a searching algorithm in computer science. A hill climbing agent will look at neighboring values and move toward the one with the largest value. Hill climbing can be found in the game of Sims or Pacman. In the game of Pacman, Ghosts chase Pacman by following the highest value of Pacman’s scent that is diffused throughout the level. As with the torch above, the floor tiles around where Pacman is currently has the greatest scent value. Therefore, Ghosts hunt Pacman using the hill climbing technique by following the greatest value of Pacman’s diffused scent. hill2.flv hill3.flv