Giter Site home page Giter Site logo

ia-robot-mazes's People

Contributors

adr1an0s0ar3s avatar filipepcampos avatar xico2001pt avatar

Watchers

 avatar

Forkers

filipepcampos

ia-robot-mazes's Issues

Implement heuristic 1

Description:
Prioritize states in which the list of operators contains at least one of the directions that are fundamental to reach the final state. For instance, in a square matrix, if the robot is in the bottom left corner and the final state is in the top right corner, it should avoid visiting states that do not contain a single UP or RIGHT instructions. If the state does not contain one of these directions, it adds cost one to the heuristic for each direction needed.

Implement heuristic 2

Description:
Pre-compute the path with the lower number of direction changes between start and finish positions, obtain the direction changes made, group patterns with most elements and sum their length with the number of ungrouped direction changes. The heuristic value will be the absolute value of the difference between the current number of commands and the value computed previously.

Tasks:

Implement hint system

While in the human gameplay mode, the player should be able to ask for a hint, by clicking on some key (eg. H).
As a maze might have several solutions, the algorithm should:

  1. Calculate the optimal solution using the instructions the player already selected (if the instructions are empty, skip to 3.1).
  2. If a solution is found, then it must
    2.1. Append the following instruction to the path.
  3. Otherwise, it should
    3.1. Calculate the optimal solution, starting with an empty set of instructions.
    Note: This optimal solution could be calculated only once in the beginning for efficiency purposes.
    3.2. Erase the path and append the first instruction to it.

Optionally, the controller could implement mechanisms to highlight instructions provided by the hint system (eg. a different color) and display the number of used hints.

Modify PygameGUI to provide a method to display images

To avoid loading the images in every frame, the GUI must store the images in a data structure that allows to easily access information.

A possible implementation of a solution to this problem would include a dictionary that stores the images information and each time an image should be drawn, it checks if it was already loaded before.

Implement gameover screen

In the human gameplay mode, this screen should display information about:

  • The amount of time the player spent trying to solve the maze
  • The number of wrong attempts the player did before submitting the correct answer
  • The number of used hints

Implement menu

The main menu of the game should provide the following configuration parameters:

  • Level: Select the maze file (maybe with a preview of the map?)
  • Mode: If the game should be played by the AI or the player

If the AI mode is selected, one more parameter should be provided:

  • Algorithm: The algorithm that will be used to perform the search

Screen size doesn't adapt to non-optimal solutions

For example, if an solution found by DFS with max_depth is found, it usually will be larger than the optimal solution therefore occupying more screen space. Currently the window size is set to accommodate the optimal solution on the start

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.