Git planner

Summary Students author a planning "domain" file in PDDL format (Planning Domain Definition Language) to represent a variety of common tasks supported by the widely-used Git distributed version control system. The end result is a tool that is capable of producing a series of Git commands that transform a given Git repository into a specified goal state. The intended users of such a tool are the students themselves but also novice Git users. In an example scenario, a repository may contain a file that was accidentally deleted, and the planner would be capable of producing a series of commands that recover the file. Only a subset of Git's numerous features must be implemented. A list of required "predicates" and "actions" are provided; students are required to implement the actions by defining each action's parameters, preconditions, and effects. To do so, students must learn how various Git commands make use of the workspace, repository, and staging index. They must also learn how to represent this knowledge in a declarative form to match the semantics of PDDL.
Topics planning, PDDL, Git, version control systems
Audience Introductory Artificial Intelligence (AI) students who have prior experience with Git
Difficulty The PDDL language has a Lisp-like syntax that might be challenging to students unfamiliar with its use of parentheses and prefix function notation. This challenge is amplified due to the poor state of PDDL parsers commonly found in planning engines. Often, invalid PDDL files produce indecipherable error messages, no error messages at all, or misleading error messages such as "no plan was found." Even so, our experience has shown that students find the greatest challenge in representing preconditions and effects in a way that meet the constraints and semantics of the PDDL language and planning engines.
Strengths This assignment has multiple strengths. Students learn how planning engines work by practicing with them in a novel domain. The domain is new, realistic, and practically useful so students are motivated to solve the problem. The PDDL language features that are required in this assignment are STRIPS and ADL (Action Description Language), the latter of which provides "exists" and "forall" quantifiers in preconditions and effects as well as conditional effects. Students must find a way to describe the behavior of various Git commands in terms of these language features. Declarative languages like PDDL are often used in AI research and applications, though they require a different way of thinking than "procedural thinking" with which students are often more familiar. Lastly, students acquire a deeper knowledge of Git. This is advantageous because many computer science-related jobs and research positions make use of this tool.
Weaknesses Students may spend significant time battling PDDL syntax and attempting to make sense of poor error messages by the planning engine. In practice, we find that students spend more time finding a way to translate their procedural knowledge of Git into the declarative model of PDDL, which is the focus of the assignment.
Dependencies Students should know the basics of planning and the STRIPS model of planning domains. The Fast-Downward planner is mentioned in our assignment description, although any planner that supports PDDL with STRIPS and ADL language features may be used in its place. Access to the Git suite of tools is essential for exploring the effects of Git commands.
Variants A wider variety of Git commands may be explored. The assignment only makes use of Git commands that work on the local repository and a single commit. However, Git has support for a history of commits, multiple branches, and remote repositories. Instructors should be cautious when including a wider variety of commands, however, as the complexity could easily extend into a semester- or year-long research project.