How to correctly prune tropical trees

by   Jean-Vincent Loddo, et al.
Université Paris 13

We present tropical games, a generalization of combinatorial min-max games based on tropical algebras. Our model breaks the traditional symmetry of rational zero-sum games where players have exactly opposed goals (min vs. max), is more widely applicable than min-max and also supports a form of pruning, despite it being less effective than alpha-beta. Actually, min-max games may be seen as particular cases where both the game and its dual are tropical: when the dual of a tropical game is also tropical, the power of alpha-beta is completely recovered. We formally develop the model and prove that the tropical pruning strategy is correct, then conclude by showing how the problem of approximated parsing can be modeled as a tropical game, profiting from pruning.


page 1

page 2

page 3

page 4


Common Information Belief based Dynamic Programs for Stochastic Zero-sum Games with Competing Teams

Decentralized team problems where players have asymmetric information ab...

Robust No-Regret Learning in Min-Max Stackelberg Games

The behavior of no-regret learning algorithms is well understood in two-...

Last-Iterate Convergence: Zero-Sum Games and Constrained Min-Max Optimization

Motivated by applications in Game Theory, Optimization, and Generative A...

Solving Non-Convex Non-Concave Min-Max Games Under Polyak-Łojasiewicz Condition

In this short note, we consider the problem of solving a min-max zero-su...

Solving Non-Convex Non-Differentiable Min-Max Games using Proximal Gradient Method

Min-max saddle point games appear in a wide range of applications in mac...

Playing Games with Bounded Entropy: Convergence Rate and Approximate Equilibria

We consider zero-sum repeated games in which the players are restricted ...

Making Change in 2048

The 2048 game involves tiles labeled with powers of two that can be merg...

1 Introduction

We are all familiar with games such as Chess or Checkers. Such games are purely rational as they do not involve any element of chance; they are also zero-sum, as the players’ interests are dual: what one “wins”, the other “loses” — which is the origin of the - evaluation mechanism. The two fundamental questions to be asked in a rational game are “Who will win?” and “How much will she win?”. Answering such questions involves searching for a strategy trough a (typically large) game tree. Some optimized search techniques were developed, which in the case of combinatorial two-player games include the - pruning technique [1, 2]. - is not an approximated algorithm: its correctness relies on the mutual distributive properties of and . In this work we explore the implications of assuming only one player to be rational, breaking the symmetry of the traditional “double-sided” rationality. Quite unsurprisingly our tropical -pruning depends on just one distributive property, a requirement satisfied by tropical algebras (Section 3).

Following the style introduced by [3] and [4], we will distinguish two aspects of two-player combinatorial games: a first one that we call syntactic, consisting in a description of the possible game positions and the valid moves leading from a position to another; the game syntax is the formal equivalent of the intuitive notion of the “game rules”. By contrast the semantic aspect is concerned about the interpretation of the game according to the interests of the players, and ultimately about the answer to the two fundamental questions above. Our semantics will be based on tropical algebras, and as a consequence our technique is widely applicable, relying as it does only on their comparatively weak hypotheses.

We formally define tropical -pruning and prove its soundness, as our main contribution (Section 4). A further contribution consists in our formalization of game evaluation and tropical (and -) cuts as a small-step semantics, so that proofs can reuse the results of term-rewriting theory.

Actually, our soundness result subsumes other works proving -’s soundness over distributive lattices such as [4] and (later) [5], since distributive lattices are bi-tropical structures (Definition 8).

We conclude by proposing the algorithm design style Choose-How-To-Divide and Conquer meant for attacking even apparently unrelated search problems as tropical games; we develop approximated parsing as one such problem by showing how it profits from -pruning (Section 5).

2 Combinatorial game syntax and semantics

2.1 Syntax

We speak about “syntax”, hinting at formal grammars, in that some initial game positions are given, together with some “rule” allowing to derive successive positions from those: in this way a game can be seen as the tree of all the possibilities of playing it — the tree of all the possible matches.

Definition 1 (Syntax)

A game syntax or arena is a triple , where:

  • is the set of all game positions.

  • the turn function , says whose turn it is: for “player” or for “opponent”.

  • the successor function , taking a game position and returning all the positions reachable with valid moves from there; .

Given , we define:

  • the set of terminal positions .

  • the dual arena , of course with , where for any we have .

  • the relation is the binary version of the relation: for all , iff for some , where .

The arena is called alternate-turn iff implies .

If is Nötherian we speak about Nötherian or finite arena.

Remark 1 (Alternate-turn arenas)

It is possible to systematically make a game alternate-turn by “collapsing” all the sequences of consecutive moves of the same player into single moves.

One of the most important ideas in Game Theory is the

strategy, containing a plan to win the game — a player saying to herself “if this happens I should do that, but if this other thing happens I should do that, and so on”. It should be noticed that a strategy is only related to the syntactic part of a game, being independent, per se, from the game evaluation. In particular, a strategy may very well not be winning.

Definition 2 (Strategy)

Let be an arena, and be a position. We define:

  • the reachable positions from as the right elements of the reflexive-transitive closure of the relation : ;

  • a global strategy , as a subset of the relation which is:

    • deterministic in positions:
      for all where , if then , for some such that .

    • complete in positions:
      for all where , .

  • a strategy for the initial position is a global strategy for the restricted arena , where we indicate with the restriction of a function to the set .

2.2 Semantics

Let us assume a finite game with syntax . Traditionally the two players have exactly opposed interests and we assume, by convention, that the player will try to minimize the payoff of the final position while the opponent will try to maximize it.

The ordinary way of evaluating such a finite game consists in labeling non-terminal nodes with the functions and (according to the turn), and terminal nodes with the payoff of the terminal position . Such values are then “propagated” back, applying the function at each node to its children’s values. The final value at the root is called the game value: it says who wins and how much, supposing both players to be rational.

Hence, assuming in accord to the tradition, the game value could be simply defined as a function of the initial position:

This classical definition has the obvious defect of only supporting the function and ; often for resolving actual games the preferred structure is , (possibly extended with and ), floating point numbers, or some sort of tuples containing such structures on which a topological order is defined. Hence, in order to be more general, let us define to be any set closed over two associative binary operations and , where will be associated to the player and to the opponent. Assuming , the definition above would become:

The extended above is a step forward, but it still has the problem of only being well-defined on finite games. We solve this problem by abandoning the functional definition of altogether, and giving a small-step semantics instead. Actually, this style will also be useful in Section 4.1 to prove the soundness of our pruning technique.

Remark 2 (Invariance under alternate-turn transformation)

It is easy to see that the transformation hinted at in Remark 1 does not alter semantics, because of the two associative properties.

Definition 3 (Game)

A game is the triple , where is the syntax, is an algebra with associative operations and , and where is the payoff function.

Sometimes we informally refer to syntactic or semantic properties as if they belonged to a game, for example by speaking about “Nötherian game” instead of “Game with Nötherian syntax”.

2.2.1 Small-step operational semantics

In the following, we assume a game , where and .
The configurations of our system consist of (ground) terms of , recursively defined as: :

  • positions in indicate game positions still to be expanded (if not terminal) and evaluated (otherwise).

  • values in denote the value, already fully computed, of some sub-terms.

  • a complex term such as or indicates a position at some state of its evaluation; or holding the turn information, and representing the game subterms from that state on.

It is crucial not to mistake terms of , which represent partially expanded game trees, for game positions, which in practice will also tend to be structured symbolic terms, but can be considered atomic at a high level: the rewrite rules shown in the following work on , not on .

Syntactic conventions

We use (possibly with subscripts or primes) to indicate positions in , and for generic terms, for values in , and for of terms in . Sequences are allowed to be empty, if not specified otherwise in a side condition. Just to make the notation more compact we will write instead of and for . We write instead of either or , just to avoid duplicating otherwise identical rules. Sequences are written with no commas, and parentheses or brackets are used to group when needed.




hack [-reduce]

hack [-reduce]

hack [Return]

[Context] for all contexts

[Payoff] simply replaces a terminal position with its value in , by means of the payoff function. [-expand] and [-expand] expand a position, generating its successors and keeping track of the turn, which will be important at reduction time. [-reduce] and [-reduce] combine two values into one, using for the player and for the opponent. Notice that these two rules are sources of non-determinism. [Return] unwraps a completely evaluated term containing a single value. [Context] allows to use the other rules within nested terms (also introducing non-determinism).

Notice that keeping the relation distinct from allows us, when needed, to see our semantics as a term rewriting system (TRS) [6].

Proposition 1

is strongly confluent.


For the purposes of this proof, we consider the small-step semantics as a pure term-rewriting system, expressed in a slightly sugared notation. The system does not need to be conditional (CTRS), since all the rule premises can in fact be seen as structural constraints on syntactic constructors. and should also be read as syntactic constructors, with their associative properties written as rewrite rules. What is a variable in the rules becomes a (syntactic) variable in the TRS; however, we will not exploit the full power of the formal system: reductions will only be applied to ground terms111We do not need the full power of unification: from a programming point of view, pattern matching as used in ML or Haskell is enough for our purposes..

Our TRS is trivially left- and right-linear, as no variable occurs more than once in each side of a rule. By showing that our system is also strongly closed, strong confluence follows by Huet’s Lemma 3.2 in [7]: “If is a left- and right-linear strongly closed term rewriting system, is strongly confluent”.

In order to show that the system is strongly-closed, we have to show that for every critical pair there exist such that and (as in [7] and [6]), where is the reflexive closure of .

The left-hand side of [-reduce] is . When this rule is used to generate a critical pair with any other rule, only a variable in or in can match, with the whole left-hand side of the other rule. The resulting critical pair reaches confluence (to ) in one step because redexes are non-overlapping. The same holds for [-reduce].

The only rule pairs candidate for overlapping are [-reduce] with itself, and [-reduce] with itself; we only show the first one. The only interesting case of overlapping is the term family , generating the critical pair . Notice that and vice-versa because of the associativity of :

Definition 4 (Game tree)

Let be the sub-rewrite system of , made only by the rules [-expand], [-expand] and [Context]: given an initial position , the set of game tree prefixes from is the set . The game tree, if it exists, is the tree whose positions are all terminal.

The game tree is well-defined: when it exists it is unique. Actually, the TRS defining is non-ambiguous (there is no overlap among any reduction rules) and left-linear: such a TRS is called orthogonal, and any orthogonal TRS is confluent [8].

Proposition 2

is normalizing for any Nötherian game.


Let a game where and be given. We prove normalization by exhibiting a reduction order compatible with our rules [6].

Let us define a weight function to be a particular instance of the higher-order function , where for any and for any . Intuitively, returns times the number of nodes in the game tree for Nötherian games.

Let be:

In the formula above and in the rest of this proof represents the sum operation over . We define our order on terms by using the interpretation on : by definition, let . The order is trivially stable, as our terms do not contain variables. is also monotonic ( is increasing because is increasing), strict ( is strict) and well-founded ( is well-founded). Hence, is a reduction order.

In order to prove compatibility we show that for every rule we have , which by definition is equivalent to . All equalities follow from definitions or trivial algebraic manipulations:

  • [Payoff]: .

  • [-expand], [-expand]: .

  • [-reduce], [-reduce]: .

  • [Return]: .    ∎

Intuitively, if a term converges then its sub-terms also converge; said otherwise if a term converges in a context, then it must also converge in the trivial (empty) context. This is true because of the non-erasing nature of our system, different from, for example, the -calculus having actual reduction steps [8]. More formally:

Lemma 1 (Sub-term normalization)

Given a game where , for any term and any context , if there exists such that then there exists such that .


By induction over the derivation length of . We look at the possible shape of the premise of the [Context] rule, .

  • Base case, : . The only applicable rules are [Payoff] and [Return]: in the case of [Payoff], ; in the case of [Return], . In either case, .

  • Recursive case : . The inductive hypothesis is that for any term and context if in or fewer steps, then . Three cases:

    • and are disjoint sub-terms within .  Since the system is non-erasing has not been erased, i.e. ; for inductive hypothesis .

    • contains .   may have as its premise [Return], in which case and . Otherwise the premise may be [-Reduce] or [-Reduce]: either is one of the values, or it matches one of the variables, in which case there exists a context such that ; then the inductive hypothesis applies.

    • contains .  , hence by definition of we have that can turn into . There exists a context where , hence . By induction hypothesis . ∎

Normalization and confluence justify our re-definition of the game value as the transitive closure of the transition relation :

Definition 5 (Game Value)

Let a game, an initial position and a value be given; we say that the game value from is (and we write ) if and only if .

3 - pruning

The - algorithm [1, 2] is a method for computing the exact value of a - combinatorial game without exhaustively visiting all game positions.

The - algorithm is traditionally presented as a recursive function written in imperative style (see Figure 1): the function alpha_beta analyzes a game position with two additional parameters, and , each one denoting a sort of threshold not to be overstepped during the incremental computation of the value of . Whenever the threshold is past the evaluation of an entire subtree is aborted, as it can be proven that it will not contribute to the result.

The correctness of - relies on the algebraic properties of the and functions, notably their mutual distributive laws — something we can not count on under our weaker hypotheses on and [4, 5, 3].

1function alpha_beta():
2  if  then
3    return 
5  if  =  then
7    for  from 1 to 
8        and while  do
10  else #  = 
12    for  from 1 to 
13        and while  do
15  return 
function tropical():
  if  then
  if  =  then
    for  from 1 to  do
  else  = 
    for  from 2 to 
        and while  do
Figure 1: Pruning algorithms: traditional - pruning vs. tropical -pruning. Notice that the tropical version has the first iteration of the second loop unrolled, in order not to depend on the existence of a neutral element for .

Going back to our game semantics presentation we can model the -’s behavior by adding four more rules — two per player: hack [-will]

hack [-will]

[-cut] [-cut]

The initialization of at line 6 should be read as a first “virtual” move of the player, whose evaluation is the value inherited from an ancestor (the grandparent in an alternate-turn game). This explains the rationale of [-will]222“Will” should be interpreted as “bequeath”, in the sense of leaving something as inheritance to a descendent.: whenever subtrees are nested with turns --, a grandparent may cross two levels and “give” its grandchild its current accumulator as an initialization value. Of course line 10 is the dual version for the opponent and [-will].

[-cut] and [-cut] are a simple reformulation of the cut conditions at lines 7 and 11, where the explicit order disappears333This is customary with lattices, when an order is derived from a least-upper-bound or greatest-lower-bound operation. from the condition, now expressed as an equality constraint in the rule premise: represents the fact that the player would prefer over . Dually, means that the opponent would prefer over .

Remark 3 (Non-alternate turn games)

Notice that the cut rules can just fire in alternate-turn contexts: this choice simplifies our exposition, but does not limit generality: see Remarks 1 and 2.

The presence of two exactly symmetrical behaviors is quite evident in either presentation; yet what we are interested in showing now is the fact that such duality is quite incidental: it occurs in a natural way in actual two-player games, yet many more search problems lend themselves to be modeled as games despite lacking an intrinsic symmetry.

We can see - as the union of two separate techniques applied at the same time, breaking the algebraic symmetry of the player/opponent operations: in the following we are going to eliminate the rules [-will] and [-cut], or equivalently to turn alpha_beta into tropical (see Figure 1), exploiting the weaker properties of tropical algebras which only allow one threshold .

4 Tropical games

As we are dealing with a relatively young research topic, it is not surprising that the formalization of tropical algebras has not yet crystallized into a standard form. And since several details differ among the various presentations, we have to provide our own definition:

Definition 6 (Tropical Algebra)

An algebra is called a tropical algebra if it satisfies the following properties for any , and in :

  1. Associativity of :

  2. Associativity of :

  3. Left-distributivity of with respect to :

  4. Right-distributivity of with respect to :

Some particular choices of , and are widely used: the min-plus algebra is obtained by defining , and, a little counter-intuitively444The particular symbols used for indicating and are justified by the analogy with and in how the distributive law works., .

Since and can also be usefully instantiated in other ways, we will not simply adopt a min-plus algebra; anyway in practice we will also choose to be a minimum on , which in practice will have a total order. This seems to be the only reasonable choice for the applications555Logic programming is an example of an interesting problem lending itself to be interpreted as a combinatorial game on a universe with no total order [3, 4]. Anyway the underlying game is a symmetrical inf-sup rather than simply tropical. and helps to understand the idea, yet nothing in the theory depends on the existence of the order. Again, in practice, will return one of its parameters, so if needed we will always be able to trivially define a total order as  iff , for any and in . and will also tend to be commutative in practice, making one of the two distributive properties trivial.

We will not make any of the supplementary hypotheses above; on the other hand, we will require the following rationality hypothesis666In lattice theory, the rationality hypothesis is one of the absorption identities.:

Definition 7 (Rationality)

Let be a tropical algebra such that is a neutral element for and is a neutral element for 777The existence of neutral elements is not strictly necessary, but it simplifies many statements and proofs; without them several results should be given in both “left” and “right” forms.. We call the algebra rational if, for any we have .

Intuitively, the opponent accumulates costs with , “worsening” the game value for the player: the player will always choose just over “worsened” by something else. Notice that the notion of rationality for two-player games in Game Theory also includes the dual condition ; such condition does not hold in general for tropical games.

Definition 8 (Tropical Game, Tropical Trees)

A tropical game is simply a game based on a rational tropical algebra . We call tropical trees all the game trees of a tropical game, and tropical pruning the -pruning of a tropical tree. A bi-tropical game is a tropical game whose dual is also tropical, where if .

4.1 Soundness of tropical pruning

Proposition 3 (Insertion property)

Let be a rational tropical algebra. Then for any we have .

Proof (Using associativity implicitly)

{right-distributivity} {left-distributivity} {rationality}

The insertion property is the semantic counterpart of the rule [-will]: it explains why we can “transfer” down in the tree (or more operationally, why we can “start” from the same when choosing with two plies below), without affecting the game value.

Definition 9 (-irrelevance)

Let be a rational tropical algebra, and let . Then we call -irrelevant with respect to and if .

Intuitively, as the value of an opponent-level tree, can’t affect the value of the game because the player will not give the opponent the opportunity to be in that situation: in other word, the current optimal move for the player doesn’t change because of .

Lemma 2 (-irrelevance)

Let be a rational tropical algebra, and . If then any is -irrelevant with respect to and .


 {hypothesis}  {associativity}  {rationality}  {hypothesis}

Definition 10 (Simulation)

Given a tropical game, we say that a term simulates a term , and we write , if .

Lemma 3 (Tropical -will simulation)

Given a tropical game where , for any term sequence ,


By the Sub-term normalization Lemma, if converges there will exist some value sequences such that , , ; let us call the result of , the result of and the result of . Then,

In the reductions above we implicitly assume that some sequences are non-empty; the proof trivially generalizes to empty and by using neutral elements. ∎

Lemma 4 (Tropical cut simulation)

Given a tropical game where , for any term sequence , we have that if , then .


Just like Lemma 3, with -irrelevance at the end. ∎

Theorem 4.1 (Tropical rule soundness)

Adding the rules [-will] and [-cut] “does not alter semantics”, i.e. if a term converges to a value in a system without the two new rules, it is guaranteed to have a reduction sequence converging to also in the extended system. ∎

5 Choose-How-To-Divide and Conquer

According to the classical Divide and Conquer technique a problem can be divided into subproblems, each of which will be solved recursively until a minimal-size instance is found; sub-solutions will then be recomposed.

In the traditional Divide and Conquer style, each division choice is final: it is considered taken once and for all, and cannot be undone. By contrast we present an alternative model based on tropical games. In the Choose-How-To-Divide and Conquer style we work with non-deterministic choices in a solution space, using a quality criterion to be optimized and some way of “combining” sub-solutions.

Of course many nondeterministic algorithms can be expressed this way: the challenge is finding a suitable mapping to the tropical game concepts, in term of both syntax and semantics (with the required properties). The problem must have both a suitable syntactic structure, and a semantic structure with the required properties.

The action of choosing a division corresponds to a player node where the function (typically a minimization) returns the “best” option; the points where sub-solutions have their cost accumulated (often something similar to a sum, intuitively “opposed” to ) become opponent nodes where combines the values of a subtree sequence into a single result.

Tropical trees have the desirable property of supporting -pruning, with the potential of significantly cutting down the search space. The more [-will] and [-cut] can fire, the more pruning is profitable: hence the problem should be represented as a tropical game having alternate turns and branching factor greater than for at least “often enough”.

Search problems abound in Artificial Intelligence, and in particular we suspect that more symbolic computation problems than one might expect can be modeled this way. We now proceed to show an unusual application of

Choose-How-To-Divide and Conquer.

5.1 Parsing as a tropical game

Let be a given context-free grammar, defined over an alphabet of terminals and nonterminals . For simplicity888Such restrictions can be lifted at the cost of some complexity, but supporting a larger class of grammars would be quite inessential for our demonstrative purposes. let it have no -production, nor any productions with two consecutive nonterminals or a single nonterminal alone in the right-hand side. Right-hand sides will hence be of the form , with and at least one . Given a string of terminals our problem is finding the “best” parse tree of in ; when contains some errors our “best” solution just ends up being the least wrong, according to some metric; just to keep things simple in this example out metric to minimize will be the total size of the substrings which cannot be matched, in terminals. Sometimes we may wish to have the set of all best parses, instead of being content with just one optimal solution.

5.1.1 Syntax.

The set of game positions is defined as , and the turn function is , . These definitions become easy to understand once the successor function is examined.

A player position has the form , since the player has to parse a string with a nonterminal . It has to choose a production
, and match the terminals with the terminals in , in the right order. Each possible match of all terminals, for each production of , is a valid player move generating strictly smaller subproblems for the opponent: the nonterminals “in between” the matched terminals will have to be matched to substrings of in the opponent position , for some . If no match exists with any production then is terminal.

In an opponent position the opponent has always exactly moves: the opponent will give the player each pair to solve “one at the time”. For this reason the successor of an opponent position is equal to the position itself: it is the sequence of the elements of , itself a sequence. An opponent position is terminal when it is empty.

Figure 2 contains a practical example.

Figure 2: We use the simple grammar above, with an intentionally high level of ambiguity, to parse the string "1 + 2 + 3" with as the start symbol. Circles represent nodes, squares are for .

5.1.2 Semantics.

We use a min-plus algebra for : we simply define ; we take , since we want as few errors as possible; and finally : the number of total errors in the parse tree is equal to the sum of the number of errors in all subtrees.

The payoff is defined as the length in characters of the input string for player positions (notice that the payoff is only defined on terminal positions, so such a length is actually the number of unmatched characters), and zero for opponent positions (if then there are no errors to accumulate: at the level above, the player matched the whole string): , .

5.1.3 Experiments

We implemented a prototype system999The prototype is freely available under the GNU GPL license at the address
in ML supporting the grammar of Figure 2, which can be configured to do a simple exhaustive search or perform tropical -pruning. The prototype supports two policies: first-minimal (henceforth FM) searches for only one optimal strategy at ’s levels, and all-minimals (henceforth AM) generates a sequence of strategies with non-increasing cost.
Just as illustrative examples, we proceed to show our system behavior on some input strings belonging to different categories.

Non-ambiguous input: the input string "let x = 42 in x + if 84=42 then 55 else 77" is parsable in a unique way, so the FM policy is clearly the right choice. Compared to an exhaustive search the -pruning FM version avoids of the recursive calls ( vs ) and its completion time is . By setting the policy to AM the number of recursive call grows a little, from to (still avoiding of the calls).

Ambiguous input: with the input string "let x = 84 = 42 = 21 in 1 + 2 * 3", which is parsable in several ways, the the -pruning FM version avoids of the recursive calls ( vs ), and the run time is of the exhaustive-search version time. The -pruning AM version still avoids of the recursive calls ( vs ), and its run time is .

“Wrong” input: with the input string "if if if true then true else false then 10 else (1+(2+)+3)", containing errors, the -pruning FM version avoids of the recursive calls ( vs ) and its run time is , while the AM version avoids of the recursive calls ( vs ); the AM version’s run time is reduced to . The best strategy has value , corresponding to the size of the substring "if true" (blanks are not counted) added to the size () of the empty substring delimited by the tokens "+" and ")". The -pruning algorithm has localized errors, guessing that the user should fix her string by replacing "if true" with something correct and writing something correct between "+" and ")"

— having the size of the unmatched substrings as the payoff function yields this “smallest-incorrect-string” heuristic. Of course other more elaborate criteria are also possible, such as “minimum number of errors”.

Memoization: on a completely orthogonal axis, the implementation may be configured to perform memoization: when memoization is turned on all the already solved positions are cached, so that they are not computed more than once. We have compared a memoizing version of our tropical--pruning parser with a memoizing version performing exhaustive search. In the first case above, the string "let x = 42 in x + if 84=42 then 55 else 77" is now parsed with calls instead of , again saving of the calls ( vs ) and cutting the run time to . "let x = 84 = 42 = 21 in 1 + 2 * 3" is now parsed with calls instead of , avoiding of the calls ( vs ) and reducing the run time to . The string "if if if true then true else false then 10 else (1+(2+)+3)" is parsed with calls instead of , avoiding of calls ( vs ) and cutting the completion time to .

At least in our small test cases, tropical -pruning and memoization work well together: enabling either one does not significantly lessen the efficacy of the other.

6 Conclusions and future work

We have introduced and formally proved correct tropical -pruning, a variant of --pruning applicable to the tropical games underlying Choose-How-To-Divide and Conquer problems. As a practical example of the technique we have shown how the problem of approximated parsing and error localization can be modeled as a game, and how our pruning technique can dramatically improve its efficiency; yet an asymptotic measure of the visited node reduction would be a worthy development.

We suspect that many more problems can be formalized as tropical games, and the problem of parsing itself can also definitely be attacked in a more general way, lifting our restrictions on the grammar; tropical parsing might prove to be particularly suitable for natural language problems, with their inherent ambiguity.

The correctness and efficiency of parallel tropical -pruning implementations would be particularly interesting to study.


Christophe Fouqueré first recognized tropical algebras in the properties required by our formalization.


  • [1] Hart, T.P., Edwards, D.J.: The tree prune (TP) algorithm. Artificial Intelligence Project Memo 30, Massachusetts Institute of Technology, Cambridge, Massachusetts (1961)
  • [2] Knuth, D.E., Moore, R.W.: An analysis of alpha-beta pruning. Artificial Intelligence 6 (1975) 293–326
  • [3] Loddo, J.V.: Généralisation des Jeux Combinatoires et Applications aux Langages Logiques. PhD thesis, Université Paris VII (2002)
  • [4] Loddo, J.V., Cosmo, R.D.: Playing logic programs with the alpha-beta algorithm.

    In: Logic for Programming and Automated Reasoning (LPAR). Number 1955 in LNCS, Springer (2000) 207–224

  • [5] Ginsberg, M.L., Jaffray, A.: Alpha-beta pruning under partial orders. In: In Games of No Chance II. (2001)
  • [6] Klop, J.W., de Vrijer, R.: First-order term rewriting systems. In Terese, ed.: Term Rewriting Systems. Cambridge Universisty Press (2003) 24–59
  • [7] Huet, G.: Confluent reductions: Abstract properties and applications to term rewriting systems: Abstract properties and applications to term rewriting systems. J. ACM 27(4) (1980) 797–821
  • [8] Klop, J.W., Oostrom, V.V., de Vrijer, R.: Orthogonality. In Terese, ed.: Term Rewriting Systems. Cambridge Universisty Press (2003) 88–148