Skip to main content

Multiple search algorithms in Romania map

Project description

Romania Search

Romania Search is a college project for Artificial Intelligence subject, where you do a given search method to find and print the way the method goes through two cities in the Romania contry.

The start city is given by the user, but the destination is always Bucharest. You can use the following methods:

- Breadth-first search
- Depth-first search
- Uniform-cost search
- Greedy search
- A* search

Installation

Use the package manager pip to install romania_search

pip install romania_search

Usage

Import RomaniaMap.py and use the search method, giving as parameters start city, search method. Additionally, you can use a third parameter as a boolean to determine if a colorful full path will be printed. Otherwise, only total distance will be displayed.

from romania_search.romania_search import RomaniaMap

#Do a greedy search between Arad and Bucharest and print everything
RomaniaMap.search('Arad', 'greedy', True)

#Do a depth-first search through Zerind and Bucharest and print only total distance
RomaniaMap.search('Zerind', 'dfs')

Each search has it own string, so change the search parameter as follows:

- Breadth-first search - 'bfs'
- Depth-first search - 'dfs'
- Uniform-cost search - 'c_unif'
- Greedy search - 'greedy'
- A* search - 'star'

Author

Raphael Garcia

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Romania Search-0.0.3.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Romania_Search-0.0.3-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file Romania Search-0.0.3.tar.gz.

File metadata

  • Download URL: Romania Search-0.0.3.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for Romania Search-0.0.3.tar.gz
Algorithm Hash digest
SHA256 d6dcb9bc6419d4cc5a421fb3ba46dbaff7df33bf6bf52490900ddf2ef2d505bc
MD5 d33d63cda1486d6ff07e6af6d0de9150
BLAKE2b-256 f334ed0633e9c986a9a5dd9662cc843353ba55a3bb2dbba9a8109cb967ca1c68

See more details on using hashes here.

File details

Details for the file Romania_Search-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: Romania_Search-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for Romania_Search-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f8342671462118a015a6ce2b0e42235b78303d6564a469cd511bfeaa73fff07d
MD5 41bd523e0a0fd6aa0eebd76749c06f64
BLAKE2b-256 dec5f874fd0f875b340292561c1695b269789fcc6c13ddd574be5adeba68d5fb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page