Source code for Popeel, a potato-peeling toy software "robot".
Current version 0.1.2.
Should work under both Python2 and Python3.
Standard goal: write an algorithm that leads Popeel to peel a given number of potatoes. Catch: potatoes are peeled one by one, taken from a basket with a limited number of potatoes. A large store with infinitely many more potatoes is available, but the task of going there to refill the basket has to be programmed explicitly.
Two simpler goals are provided through the "first user" and "second user" program files.
Get the file popeel.py somewhere on your Python path. Files whose name ends with "user" contain usage examples. Files whose name includes "output" contain examples of successful runs. Program randprog.py writes random usage examples, most useless - files whose name starts with "rand" have been generated in that way, feel free to run them.
Of course, the file using Popeel correctly to get successful output is NOT provided.
Propose similar problems and design how to support them.
José Luis Balcázar, UPC, Barcelona; balqui in Github.