Giter VIP home page Giter VIP logo

pacmansearch's Introduction

Pac-Man Search

Authors: Zergio, Tyler, Michael

Phase I

Our Progress:

This week we implemented 4 search algorithms (DFS, BFS, UCS, and A*) in Python using the pseudocode available in the books. Translating the pseudocode to Python was not particularly difficult. We found that most of our time was spent experimenting with and understanding the structure of the starter code.

Question 1: Depth First Search

The Pacman board will show an overlay of the states explored, and the order in which they were explored (brighter red means earlier exploration). Is the exploration order what you would have expected? Does Pacman actually go to all the explored squares on his way to the goal?

Yes, the order is what we expected because it expands to states that lead to a dead-end. The DFS algorithm continues exploring a path until it can’t anymore. However, Pacman does not traverse all squares explored by the DFS algorithm. This is because Pacman takes the shortest path to the goal state (food) and avoids exploring a path that leads to a dead-end.

Screenshots:

Q1.1:

Q1.2:

Q1.3:

Autograder Q1:

Question 2: Breadth-First Search

Screenshots:

Q2.1

Q2.2

Q2 Autograder

Question 3: Uniform Cost Search

Screenshots:

Q3.1

Q3.2

Q3.3

Q3 Autograder

Question 4: A* Search

Screenshots:

Q4.1

Q4 Autograder

Phase II

Our Progress:

This week we completed questions five and six which required us to implement the four corners problem, and a heuristic to accelerate A* search.

Question 5: Finding All the Corners

Screenshots:

Q5.1:

Q5.2:

Autograder Q5:

Question 6: Corners Problem: Heuristic

Screenshots:

Q6.1

Q6 Autograder

Q6 Heuristic Formulation

The heuristic is consistent because at any time step, we can move in north, south, east, or west by exactly one unit for cost 1. Therefore, at each step, our path cost increases by 1, but what about the heuristic? Because our heuristic relies on the minimum distance between the current position and any corner, it can decrease by at most one per move. Therefore, the heuristic is consistent.

Because every consistent heuristic is admissible, this implies that our heuristic is also admissible.

pacmansearch's People

Contributors

zorten avatar michael-c-strobel avatar tyborgg avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.