tutorial of lib/backtracking

The cluster lib/backtracking provides a useful abstraction to implement all kinds of backtracking algorithms or and/or tree explorations.

Summary

The tutorial backtracking/expand_expression

The main class, ABSTRACT_BACKTRACKING, implements the abstract algorithm that explores a virtual and/or tree. It defines the basic data used for the exploration and the way the exploration is done. The tutorial [expand_expression] shows its use.

This tutorial expands the expressions that are entered at its input. Here is a short example.

> cd expand_expression/tree
> se c -clean -o ee expand_expression
> ./ee
the(good+bad)(boy+girl)
        (1)     the good boy
        (2)     the good girl
        (3)     the bad boy
        (4)     the bad girl

The tutorial backtracking/logigram

A tutorial that shows how to solve problems that sometimes are called logigrams. The logigrams are made of a set of items (persons, date, places, ...) grouped into categories and sets of true propositions about the items. From these propositions you must deduce how the given items are combined together.

Here is an example: there are 3 women, Marie, Julie and Eve of the 19th century. We know that:

Which woman was born in 1806? How many children did she have?

The tutorial backtracking/tiny_parse

WORK IN PROGRESS NOTHING TO SEE HERE

The tutorial backtracking/tiny_prolog

WORK IN PROGRESS NOTHING TO SEE HERE

Some other examples

The cluster regular_expression uses the cluster bactracking. Just take a look at it.

Copyright © The SmartEiffel Team - <SmartEiffel@loria.fr>