Code Monkey home page Code Monkey logo

foundations-of-ai's People

Contributors

fleureok avatar leonvreling avatar lsiecker avatar

Stargazers

 avatar

Watchers

 avatar

foundations-of-ai's Issues

Use TabooMove to force the last move

If in a leaf there is no possible move, then the previous move to get to that leaf is a TabooMove.

This is already in the code:

 181           # If there are no possible moves (when no move is valid), return a infinite value
 182           if len(getAllPossibleMoves(state)) == 0:
 183               if isMaximizingPlayer:
 184                  return None, float("-inf")
 185              return None, float("inf")

The idea is to check how many empty squares there are, if this is favourable for us to have the last move, do nothing.
If we do not have the last move at that moment, do the newly found TabooMove.

Checking how many empty squares there are can be done by counting the Sudokuboard.empty in the sudokuboard string.

Implement Transpositional table

Implementing this table will increase the speed of the iterative deepening implementation. With this table, not the whole tree has to be created in every iteration.

Early game strategy

  • search on only a subset of legal moves
  • focus on exploring moves that are guaranteed to be part of the sudoku puzzle's final solution
  • do not work from left to right

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.