/AI_algorithms

Examples of uninformed (iddfs), infromed (a-star) and local (beam) search.

Primary LanguagePython

AI_labs

1. Uninformed search

In the missionaries and cannibals problem, three missionaries and three cannibals must cross a river using a boat which can carry at most two people, under the constraint that, for both banks, if there are missionaries present on the bank, they cannot be outnumbered by cannibals (if they were, the cannibals would eat the missionaries). he boat cannot cross the river by itself with no people on board.

Algorithm:

IDDFS

2. Informed search

You have a 9-gallon and a 5-gallon jug that you can fill from a river. The problem is to fill one of the jugs with exactly 3 gallons of water.

Algorithm:

A* search

3. Local search

Maharadja and pari problem (the same as missionaries and cannibals problem)

Algorithm:

Local beam search