Skip to content

AthanasiaK/Missionaries-and-Cannibals-AI-Problem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PLH-417 EX. 3

Getting Started

This is a python-3 implemantation of the classical AI problem of Missionaries And Cannibals

Requirements

You only need Python 3

How To Run

Simply run: python MisAndCan.py

Results

The two shores are divided by the symbol --> 🌊🌊🌊 The symbol --> βž• --> followed by a number,indicates the number of missionaries, on each shore The symbol --> πŸ– --> followed by a number,indicates the number of cannibals , on each shore The symbol --> β›΅ --> can be either 1 or 0 , respectvely, indicating whether the boat is in this shore or not

The total number of correct moves and running time are also printed.

P.S. In case the symbols are not showing , the first one indicates "missionaries" followed by the number , the second "cannibals" followed by the number , the third one "boat" followed by the number, then there is the sea , and then it is the same sequence again.

Author

Athanasia Karalakou , Technical University Of Crete , athanasiak1997@gmail.com

Credits

Main idea: https://www.geeksforgeeks.org/missionaries-and-cannibals/

bfs algorithm: https://pythoninwonderland.wordpress.com/2017/03/18/how-to-implement-breadth-first-search-in-python/

About

Classical AI Problem, solved using BFS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages