The Spider Game Introduction In this project you will be implementing a game that simulates a spider hunting for food. This game is inspired by many earlier games, such as the snake game available for mobile hones and many other platforms (video available at http://www.youtube.com/watch?v=z_Ct-IKwSgo). The game is played on a varying size grid board. The player controls a spider. The spider, being a fast creature, moves in the pattern that emulates a knight from the game of chess. There is also an ant that slowly moves across the board taking steps of one square in one of the eight directions. The spider's goal is to eat the ant by entering the square it currently occupies, at which point another ant begins moving across the board from a random starting location. Game Definition The above Figure illustrates the game. The yellow box shows the location of the spider. The green box is the current location of the

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
So I have this artificial intelligence assignment and I’m struggling with the search methods implementations it would be nice if I can get the code in Java or at least a pseudocode for their implementations
The Spider Game
Introduction
In this project you will be implementing a game that simulates a spider hunting for food. This game is inspired by many earlier games, such as the
snake game available for mobile hones and many other platforms (video available at http://www.youtube.com/watch?v=z_Ct-1KwSgo).
The game is played on a varying size grid board. The player controls a spider. The spider,
being a fast creature, moves in the pattern that emulates a knight from the game of chess. There is also an ant that slowly moves across the board,
taking steps of one square in one of the eight directions. The spider's goal is to eat the ant by entering the square it currently occupies, at which
point another ant begins moving across the board from a random starting location.
Game Definition
The above Figure illustrates the game. The yellow box shows the location of the spider. The green box is the current location of the
ant. The blue boxes are the possible moves the spider could make. The red arrow shows the direction that the ant is moving - which, in this case,
is the horizontal X-direction. When the ant is eaten, a new ant is randomly placed on one of the borders of the board and assigned a random direction
to move across the screen, depending on where it starts.
To simplify the game, assume that the ant only takes a single step forward each time the spider moves. All your search algorithms
should predict the motion of the ant along with the spider, because the position to which it will move next is deterministic. If the ant makes a
move that would take it off the board, the spider has failed to catch it, and a new ant is spawned as if it had been caught.
Similar to the snake game, the game only ends if the spider makes a move that causes it to step off the board.
Configuration Playing Board ( Size i.e.,16 X 16)
The Spider location (12,9) and the Ant location (5,5).
Figure: The illustration of the spider game.
Assignment Objectives
Implement the Spider game.
Implement a Breadth_First Search for the spider to play the game.
Implement Depth_First Search for the spider to play the game.
Implement A* search.
Implement two (2) different heuristics for the spider to play the game.
Implement a third heuristic which takes the average of the first two heuristics.
Write a short report (no more than two (2) pages) about the state space of the game, and about the choice of your heuristics.
Transcribed Image Text:The Spider Game Introduction In this project you will be implementing a game that simulates a spider hunting for food. This game is inspired by many earlier games, such as the snake game available for mobile hones and many other platforms (video available at http://www.youtube.com/watch?v=z_Ct-1KwSgo). The game is played on a varying size grid board. The player controls a spider. The spider, being a fast creature, moves in the pattern that emulates a knight from the game of chess. There is also an ant that slowly moves across the board, taking steps of one square in one of the eight directions. The spider's goal is to eat the ant by entering the square it currently occupies, at which point another ant begins moving across the board from a random starting location. Game Definition The above Figure illustrates the game. The yellow box shows the location of the spider. The green box is the current location of the ant. The blue boxes are the possible moves the spider could make. The red arrow shows the direction that the ant is moving - which, in this case, is the horizontal X-direction. When the ant is eaten, a new ant is randomly placed on one of the borders of the board and assigned a random direction to move across the screen, depending on where it starts. To simplify the game, assume that the ant only takes a single step forward each time the spider moves. All your search algorithms should predict the motion of the ant along with the spider, because the position to which it will move next is deterministic. If the ant makes a move that would take it off the board, the spider has failed to catch it, and a new ant is spawned as if it had been caught. Similar to the snake game, the game only ends if the spider makes a move that causes it to step off the board. Configuration Playing Board ( Size i.e.,16 X 16) The Spider location (12,9) and the Ant location (5,5). Figure: The illustration of the spider game. Assignment Objectives Implement the Spider game. Implement a Breadth_First Search for the spider to play the game. Implement Depth_First Search for the spider to play the game. Implement A* search. Implement two (2) different heuristics for the spider to play the game. Implement a third heuristic which takes the average of the first two heuristics. Write a short report (no more than two (2) pages) about the state space of the game, and about the choice of your heuristics.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Processes of 3D Graphics
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education