All Projects → mahdavipanah → pynpuzzle

mahdavipanah / pynpuzzle

Licence: MIT license
Solve, test and benchmark algorithms for N-Puzzle problem with Python

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to pynpuzzle

goopylib
A simple-yet-powerful 2D graphics framework built on top of Tkinter capable of creating good-looking & modern GUIs, games, and simple animations.
Stars: ✭ 19 (-26.92%)
Mutual labels:  tkinter
Poke-Pi-Dex
Our deep learning for computer vision related project for nostalgic poke weebs (Sistemi digitali, Unibo).
Stars: ✭ 18 (-30.77%)
Mutual labels:  tkinter
Intelligent Document Finder
Document Search Engine Tool
Stars: ✭ 45 (+73.08%)
Mutual labels:  search-algorithm
ankimaker
Automatically generates Anki decks from many sources
Stars: ✭ 43 (+65.38%)
Mutual labels:  tkinter
spotify-downloader-music-player
Download youtube songs in mp3 format and plays them
Stars: ✭ 31 (+19.23%)
Mutual labels:  tkinter
Form-Labeller
Use this tool to label forms, bounding boxes, and assigning types to annotations
Stars: ✭ 17 (-34.62%)
Mutual labels:  tkinter
TKinterDesigner
TKinterDesigner is a tool software to develop the Python User Interface for Python programmer.
Stars: ✭ 663 (+2450%)
Mutual labels:  tkinter
Project-1-Search-in-Pacman
Search algorithms(BFS, DFS, UCS, A*) in python.Berkeley Pacman Project 1.
Stars: ✭ 20 (-23.08%)
Mutual labels:  search-algorithm
AwesomeTkinter
Pretty tkinter widgets
Stars: ✭ 64 (+146.15%)
Mutual labels:  tkinter
python-messenger
Python GUI Multi User Messenger
Stars: ✭ 28 (+7.69%)
Mutual labels:  tkinter
Object-Detection-using-LiDAR
This repo detect objects automatically for LiDAR data
Stars: ✭ 38 (+46.15%)
Mutual labels:  tkinter
Raymarch-Engine
Minimal ray-traced game engine with gravity affected rays
Stars: ✭ 17 (-34.62%)
Mutual labels:  puzzle
The-chat-room
Python 版的多人聊天室, 图形界面版
Stars: ✭ 100 (+284.62%)
Mutual labels:  tkinter
js-algorithms
Computer science
Stars: ✭ 64 (+146.15%)
Mutual labels:  search-algorithm
Notepy
Notepy is a full-featured Notepad Python app
Stars: ✭ 12 (-53.85%)
Mutual labels:  tkinter
numberlink
Program for generating and solving numberlink / flow free puzzles
Stars: ✭ 47 (+80.77%)
Mutual labels:  puzzle
AWKTC
AWKTC is Workable Klutzy Time-wasting Command
Stars: ✭ 44 (+69.23%)
Mutual labels:  puzzle
LixD
Lix: Lemmings-like game with puzzles, editor, multiplayer
Stars: ✭ 80 (+207.69%)
Mutual labels:  puzzle
bot tulis
Pemalas versi desktop. Untuk yang ini tersedia versi CMD dan GUI. Pemalas adalah program untuk mengubah text menjadi tulisan diatas buku dalam bentuk gambar.
Stars: ✭ 43 (+65.38%)
Mutual labels:  tkinter
honeybot
🛩 A python IRC bot with simple plugins dev. Ignited in mauritius, first-timers friendly! Moved to github.com/pyhoneybot/honeybot
Stars: ✭ 57 (+119.23%)
Mutual labels:  tkinter

pynpuzzle is an application that helps you to solve n-puzzle problem and also to test your algorithms for n-puzzle problem. It is written in Python and uses tkinter for it's graphical interface.

pynpuzzle screenshot

NOTE: This project is not actively maintained and you may encounter some issues running it. One known issue is due to the psutil library's access denied issue on macOS. Feel free to send a pull request at anytime.

Installing

Prerequisites

Debian Linux (Ubuntu)

Open terminal and install these packages:

sudo apt-get install python3.5 python3-tk python3-psutil

Now you can run pynpuzzle from terminal: ./pynpuzzle

Windows

Download and install Python's installer (version 3.5 or higher) from it's official website. After installing python, open command line and install psutil package using pip: pip install psutil. Now you can run pynpuzzle.py from command line: python pynpuzzle.py.

Adding new algorithm

pynpuzzle loads algorithms from algorithms folder next to pynpuzzle.py.
All python files (.py) inside this folder (./algorithms/*.py) are considered as algorithms and pynpuzzle tries to load them.
An algorithm module should have a search function that accepts two arguments.
First argument is the n-puzzle's current state and the second one is the goal state.
Each of the arguments are two dimensional lists that represnt a n-puzzle. For example (test_algorithm.py):

def search(state, goal_state):
  """
  Test algorithm
  """
  pass

Docstring of the function will be presented as the name of the algorithm in app's algorithms combobox (if function has no docstring, module's filename will be used. test_algorithm in this case.).
And finally, function should return an m*n*n three dimensional list which represents a set of paths from state to goal_state.

Logs about algorithm's modules can be seen from menubar's Show logs item.

These algorithms are included in the app and can be used as code examples for adding new and more complex algorithms:

Author

Hamidreza Mahdavipanah

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].