CLI Eight Puzzle mini-game featuring BFS, DFS, Greedy and A* searches as solver algorithms.

Overview

🕹 Eight Puzzle CLI

Jogo do quebra-cabeças de 8 peças em linha de comando desenvolvido para a disciplina de Inteligência Artificial. Escrito em python, este projeto tem como objetivo a aplicação dos conceitos estudados e a implementação de um simples agente inteligente que consiga resolver o jogo.

Execução do projeto

Dependências

  • Python 3.9.0 ou superior

Execução

  • Clone o projeto (ou baixe):
    git clone https://github.com/Nakahwra/EightPuzzle.git
    && cd EightPuzzle/
  • Execute o arquivo principal jogo.py:
    python3 ./jogo.py

Agentes automáticos

São implementados dois agentes automáticos que utilizam dois algoritmos de buscas de "força bruta":

Breadth-first Search Algorithm - BFS

Busca em largura, algoritmo de busca em grafos/árvores onde prioriza-se a exploração de todos os vértices vizinhos antes da travessia para a próxima profundidade, até que se encontre um nó solução.
bfs

Depth-first Search Algorithm - DFS

Busca em profundidade, algoritmo de busca em grafos/árvores onde prioriza-se a exploração de um dos ramos do nó raíz em sua totalidade até que se encontre um nó solução.
dfs

Configurações opcionais

Tabuleiro

O tabuleiro pode ser ajustado no construtor da classe de regras do jogo em: regras_jogo/regras_eightpuzzle.py. Lá estão disponíveis outros dois tabuleiros usados para testes, e também pode-se configurar novos tabuleiros.

Intervalo entre jogadas

O intervalo entre cada jogada de um agente automático pode ser configurado alterando o parâmetro da função sleep em agentes/agente_automatico.py no método escolherProximaAcao


🚀 Desenvolvido por Lucas Nakahara e Gabriel Rodrigues

You might also like...
zoofs is a Python library for performing feature selection using an variety of nature inspired wrapper algorithms. The algorithms range from swarm-intelligence to physics based to Evolutionary. It's easy to use ,flexible and powerful tool to reduce your feature size.
zoofs is a Python library for performing feature selection using an variety of nature inspired wrapper algorithms. The algorithms range from swarm-intelligence to physics based to Evolutionary. It's easy to use ,flexible and powerful tool to reduce your feature size.

zoofs is a Python library for performing feature selection using a variety of nature-inspired wrapper algorithms. The algorithms range from swarm-intelligence to physics-based to Evolutionary. It's easy to use , flexible and powerful tool to reduce your feature size.

Genetic algorithms are heuristic search algorithms inspired by the process that supports the evolution of life.

Genetic algorithms are heuristic search algorithms inspired by the process that supports the evolution of life. The algorithm is designed to replicate the natural selection process to carry generation, i.e. survival of the fittest of beings.

Wordle-solver - A program that solves a Wordle using a simple algorithm

Wordle Solver A program that solves a Wordle using a simple algorithm. To see it

Algorithms and data structures for educational, demonstrational and experimental purposes.

Algorithms and Data Structures (ands) Introduction This project was created for personal use mostly while studying for an exam (starting in the month

Minimal examples of data structures and algorithms in Python
Minimal examples of data structures and algorithms in Python

Pythonic Data Structures and Algorithms Minimal and clean example implementations of data structures and algorithms in Python 3. Contributing Thanks f

Repository for data structure and algorithms in Python for coding interviews
Repository for data structure and algorithms in Python for coding interviews

Python Data Structures and Algorithms This repository contains questions requiring implementation of data structures and algorithms concepts. It is us

:computer: Data Structures and Algorithms in Python

Algorithms in Python Implementations of a few algorithms and datastructures for fun and profit! Completed Karatsuba Multiplication Basic Sorting Rabin

Planning Algorithms in AI and Robotics. MSc course at Skoltech Data Science program

Planning Algorithms in AI and Robotics course T2 2021-22 The Planning Algorithms in AI and Robotics course at Skoltech, MS in Data Science, during T2,

My dynamic programming algorithms for exercise and fun

My Dynamic Programming Algorithms giraycoskun [email protected] It is a repo for various dynamic programming algorithms for exercise.

Releases(2.0.0)
Owner
Lucas Nakahara
Software Engineering undergraduate and aspiring full-stack developer.
Lucas Nakahara
A simple python implementation of A* and bfs algorithm solving Eight-Puzzle

A simple python implementation of A* and bfs algorithm solving Eight-Puzzle

null 2 May 22, 2022
8 Puzzle with A* , Greedy & BFS Search in Python

8_Puzzle 8 Puzzle with A* , Greedy & BFS Search in Python Python Install Python from here. Pip Install pip from here. How to run? ?? Install 8_Puzzle

I3L4CK H4CK3l2 1 Jan 30, 2022
Solving a card game with three search algorithms: BFS, IDS, and A*

Search Algorithms Overview In this project, we want to solve a card game with three search algorithms. In this card game, we have to sort our cards by

Korosh 5 Aug 4, 2022
8-puzzle-solver with UCS, ILS, IDA* algorithm

Eight Puzzle 8-puzzle-solver with UCS, ILS, IDA* algorithm pre-usage requirements python3 python3-pip virtualenv prepare enviroment virtualenv -p pyth

Mohsen Arzani 4 Sep 22, 2021
Genius Square puzzle solver in Python

Genius Square puzzle solver in Python

James 3 Dec 15, 2022
Greedy Algorithm-Problem Solving

MAX-MIN-Hackrrank-Python-Solution Greedy Algorithm-Problem Solving You will be given a list of integers, , and a single integer . You must create an a

Mahesh Nagargoje 3 Jul 13, 2021
Classic algorithms including Fizz Buzz, Bubble Sort, the Fibonacci Sequence, a Sudoku solver, and more.

Algorithms Classic algorithms including Fizz Buzz, Bubble Sort, the Fibonacci Sequence, a Sudoku solver, and more. Algorithm Complexity Time and Space

null 1 Jan 14, 2022
sudoku solver using CSP forward-tracking algorithms.

Sudoku sudoku solver using CSP forward-tracking algorithms. Description Sudoku is a logic-based game that consists of 9 3x3 grids that create one larg

Cindy 0 Dec 27, 2021
A Python project for optimizing the 8 Queens Puzzle using the Genetic Algorithm implemented in PyGAD.

8QueensGenetic A Python project for optimizing the 8 Queens Puzzle using the Genetic Algorithm implemented in PyGAD. The project uses the Kivy cross-p

Ahmed Gad 16 Nov 13, 2022
A minimal implementation of the IQRM interference flagging algorithm for radio pulsar and transient searches

A minimal implementation of the IQRM interference flagging algorithm for radio pulsar and transient searches. This module only provides the algorithm that infers a channel mask from some spectral statistic that measures the level of RFI contamination in a time-frequency data block. It should be useful as a reference implementation to developers who wish to integrate IQRM into an existing pipeline / search code.

Vincent Morello 6 Nov 29, 2022