Assignment Objectives: 1-Implement the Spider game. 2-Implement a Breadth_First_Search for the spider to play the game. 3-Implement Depth_First_Search for the spider to play the game. 4-Implement A* search.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

The Spider Game

Introduction:

In this assignment you will be implementing a game that simulates a spider hunting for food using python.

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)

 

Assignment Objectives:
1-Implement the Spider game.
2-Implement a Breadth_First_Search for the spider to play the game.
3-Implement Depth_First_Search for the spider to play the game.
4-Implement A* search.
5-Implement two (2) different heuristics for the spider to play the game.
6-Implement a third heuristic which takes the average of the first two heuristics.
7-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 3 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY