Toy codes.
Given that three good guys and three bad guys need to cross a river using only one boat which needs one guy to drive. When the bad guys outnumber the good guys on the either side of the river, the mission failed. Tree search algorithms are implemented to solve the problem.
Green Points: Good guys
Red Points: Bad guys
Yellow Point: The boat