Skip to content

SauravBrahma/GameSearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 

Repository files navigation

GameSearch

This script solves game with depth-first search and breadth-first search.

Description

This script was made to slove a question below.

Question

Question image

question

You have pails each can have 16, 9, 7 liter.
Now 16L pail is filled with water. You have to divide these into 8L and 8L respectively.
And you know minimum number of steps are 15.
But you can't throw water away, and fill up again. (This is not "Die Hard: With a Vengeance"!) The picture below is the answer.

Answer image

answer

Execution Time

The numbers below are average execution times(second) in my environment.

  • depth : 0.0015
  • breadth : 0.0032

About

This script solves game with depth-first search and width-first search.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages