amalgams: a formal approach for combining multiple case ...enric/papers/amalgam.pdf · amalgams: a...

15
Amalgams: A Formal Approach for Combining Multiple Case Solutions Santiago Onta˜ on and Enric Plaza IIIA, Artificial Intelligence Research Institute CSIC, Spanish Council for Scientific Research Campus UAB, 08193 Bellaterra, Catalonia (Spain), {santi,enric}@iiia.csic.es Abstract. How to reuse or adapt past solutions to new problems is one of the least understood problems in case-based reasoning. In this paper we will focus on the problem of how to combine solutions coming from multiple cases in search-based approaches to reuse. For that purpose, we introduce the notion of amalgam. Assuming the solution space can be characterized as a generalization space, an amalgam of two solutions is a third sulution which combines as much as possible from the original two solutions. We define amalgam as a formal operation over terms in a generalization space. We also discuss how amalgams may be applied in search-based reuse techniques to combine case solutions. 1 Introduction Case-based reasoning systems are based on the hypothesis that “similar problems have similar solutions”, and thus they solve new problems by reusing or adapting solutions to past problems. However, how to reuse or adapt past solutions to new problems is one of the least understood problems in case-based reasoning. There are multiple open problems such as which is the knowledge required for adaptation and how to acquire it [15], the relation between solution reuse and case retrieval [13] or solution revision [9]. In this paper we will focus on one of such problems, namely how to reuse solutions coming from multiple cases. The three most common approaches to reuse are: substitutional adaptation, transformational adaptation and generative adaptation [9]. In this paper we will focus on transformational adaptation techniques, and in particular in search- based approaches. In search-based approaches to reuse, the solution to a problem is seen as a description or term in a search space. The retrieved solution is seen as the starting point of a search process, which explores the search space by applying adaptation operators to the retrieved solution until a satisfactory solution to the problem at hand is found. These techniques are common, for instance, in CBR systems applied to planning domains [10]. These techniques require a starting point for the search process, which is typically the solution of the retrieved case. Imagine a trip planning CBR system that has to generate a trip to go from city A to city C, and has been able to retrieve a case with a solution to go from A to B and another case that has a solution to go from B to C. If search-based

Upload: tranxuyen

Post on 26-Mar-2019

215 views

Category:

Documents


0 download

TRANSCRIPT

Amalgams: A Formal Approach forCombining Multiple Case Solutions

Santiago Ontanon and Enric Plaza

IIIA, Artificial Intelligence Research InstituteCSIC, Spanish Council for Scientific Research

Campus UAB, 08193 Bellaterra, Catalonia (Spain),{santi,enric}@iiia.csic.es

Abstract. How to reuse or adapt past solutions to new problems is oneof the least understood problems in case-based reasoning. In this paperwe will focus on the problem of how to combine solutions coming frommultiple cases in search-based approaches to reuse. For that purpose, weintroduce the notion of amalgam. Assuming the solution space can becharacterized as a generalization space, an amalgam of two solutions isa third sulution which combines as much as possible from the originaltwo solutions. We define amalgam as a formal operation over terms in ageneralization space. We also discuss how amalgams may be applied insearch-based reuse techniques to combine case solutions.

1 Introduction

Case-based reasoning systems are based on the hypothesis that “similar problemshave similar solutions”, and thus they solve new problems by reusing or adaptingsolutions to past problems. However, how to reuse or adapt past solutions tonew problems is one of the least understood problems in case-based reasoning.There are multiple open problems such as which is the knowledge required foradaptation and how to acquire it [15], the relation between solution reuse andcase retrieval [13] or solution revision [9]. In this paper we will focus on one ofsuch problems, namely how to reuse solutions coming from multiple cases.

The three most common approaches to reuse are: substitutional adaptation,transformational adaptation and generative adaptation [9]. In this paper we willfocus on transformational adaptation techniques, and in particular in search-based approaches. In search-based approaches to reuse, the solution to a problemis seen as a description or term in a search space. The retrieved solution is seen asthe starting point of a search process, which explores the search space by applyingadaptation operators to the retrieved solution until a satisfactory solution to theproblem at hand is found. These techniques are common, for instance, in CBRsystems applied to planning domains [10]. These techniques require a startingpoint for the search process, which is typically the solution of the retrieved case.Imagine a trip planning CBR system that has to generate a trip to go from cityA to city C, and has been able to retrieve a case with a solution to go from Ato B and another case that has a solution to go from B to C. If search-based

techniques are used, the starting point of the search will be one of those twosolutions. But, clearly, the solution to the problem at hand could be generatedby combining in some way the solutions in the two retrieved cases. Therefore, abetter starting point would be one which combines both solutions.

This paper introduces the amalgam operation as a formal operation throughwhich, given two terms, a third term which combines as much as possible fromthe two original terms is generated. We will then show how this operation canbe used to define search-based approaches to reuse which can, in a natural way,reuse solutions from more than one case at a time. Our amalgam operation isapplicable in situations where the solutions to be generated by a CBR systemcan be represented as terms in a generalization space, and where a more generalthan (subsumption) relation exists in such space.

The rest of the paper is organized as follows. Section 2 introduces and moti-vates, in an informal way, the notion of amalgam. Then, Section 3 presents theconcepts of generalization space needed in Section 4, where the formal definitionof amalgam is presented. Finally, Section 5 discusses how amalgams may be usedin the CBR Reuse process. The paper closes with related work and conclusions.

2 The notion of Amalgam

The notion of amalgam can be conceived of as a generalization of the notion ofunification over terms. Unification of two terms (or descriptions) adds the contentof both terms into a new term, the unifier. Thus, if a term φ is a unifier of twoother terms (φ = ψatψb), then all that is true for one of these terms is also truefor φ. For instance, if ψa describes “a red vehicle” and ψa describes “a Germanminivan” then their unification φ is the description “a red German minivan.”Two terms are not unifiable when they possess contradictory information; forinstance “a red French vehicle” is not unifiable with “a red German minivan”since being French and German at the same time is not possible.

The strict definition of unification means that any two descriptions withonly one item with contradictory information cannot be unified. Now, imaginea scenario where two such descriptions have a large part of complementary in-formation, which a CBR system would be interested in reusing: unification isnot useful. Thus, what we would be interested in CBR is considering how toreuse their complementary information setting aside, at least momentarily, thecontradictory elements.

This is the idea that we intend to formalize with the notion of amalgam oftwo descriptions (or terms). An amalgam of two terms is a term that containsparts from these two terms forming a new coherent description. For instance, anamalgam of “a red French vehicle” and “a German minivan” is “a red Germanminivan”; clearly there are always multiple possibilities for amalgams, since “ared French minivan” is another example of amalgam.

Given to terms ψa and ψb, their possible amalgams constitutes a set of terms,and we propose that Case Reuse can exploit this set as a search space of possiblesolutions achieved by combining (amalgamating) descriptions ψa and ψb.

Generalize Generalize

AMALGAM

Unify

Fig. 1. An example of an amalgam of two cubicles.

In informal terms, since formalization will be presented later, let us considerthe content of ψa with respect to ψb divided in two parts: Ca, and Ia, whereCa is the information that is compatible with ψb, and Ia is that content in ψathat is not compatible with the content in ψb. If, for any two terms ψa andψb, we are able to identify their parts (〈Ca, Ia〉 and 〈Cb, Ib〉) there is a clearway to reuse content from both into an amalgam: Ca t Cb, i.e. unifying what iscompatible of both terms. Nevertheless, there is part of the content in Ia andIb that can de reused and added to an amalgam: it’s just that some cannot beused together (like “German” and “French” in vehicles). Thus, reusing contentin Ia and Ib to form different coherent combinations will constitute the space ofpossible amalgams that can be built from two (non-unifiable) descriptions.

Figure 1 shows an example of an amalgam of two descriptions of cubicles,where the signature “M” shape of the amalgam is made clear: given two cubicles,each one is generalized to one of their possible generalizations, and then they areunified, yielding new cubicle that amalgams aspects of both original cubicles.

3 Generalization Space

In this paper we will make the assumption that solutions to problems are termsin some language L, and that there exists a subsumption relation among terms.

We say that a term ψ1 subsumes another term ψ2, ψ1 v ψ2 when ψ1 is moregeneral (or equal) than ψ2

1. Another interpretation of subsumption is that of an“information content” order: ψ1 v ψ2 means that all the information in ψ1 (allthat is true for ψ1) is also contained in ψ2 (is also true for ψ2).

The subsumption relation induces a partial order in the terms in a languageL, thus, the pair 〈L,v〉 is a poset for a given set of terms L; additionally, we

1 In machine learning terms, A v B means that A is more general than B, while indescription logics it has the opposite meaning, since it is seen as “set inclusion” oftheir interpretations.

ψa ψb

ψa � ψb

ψa � ψb

Fig. 2. A schema of the relationships between two terms ψa and ψb and their unification(below) and antiunification (above).

assume that L contains the infimum element ⊥ (or “any”), and the supremumelement > (or “none”) with respect to the subsumption order. In the rest of thispaper we will call the pair 〈L,v〉 generalization space.

Given the subsumption relation, for any two terms ψ1 and ψ2 we can definethe anti-unification of two terms (ψ1 u ψ2) as their least general generalization,representing to the most specific term that subsumes both. If two terms havenothing in common, then ψ1 u ψ2 = ⊥. Thus, anti-unification encapsulates in asingle description all that is shared by two given terms. Moreover, depending onthe language L, the anti-unification might be unique or not. Anti-unification isdefined as follows:

ψ1 u ψ2 = ψ : (ψ v ψ1 ∧ ψ v ψ2) ∧ (@ψ′ A ψ : ψ′ v ψ1 ∧ ψ′ v ψ2)

The dual operation to the anti-unification is that of unification (ψ1 t ψ2),which is the most general specialization of a two given terms.:

ψ1 t ψ2 = ψ : (ψ1 v ψ ∧ ψ2 v ψ) ∧ (@ψ′ @ ψ : ψ1 v ψ′ ∧ ψ2 v ψ′)That is to say, the unifier has the addition of the content of the two original terms(all that is true in ψ1 and ψ2 is also true in ψ1 tψ2). However, not every pair ofterms may be unified: if two terms have contradictory information then they haveno unifier —which is equivalent to say that their unifier is “none”: ψ1 tψ2 = >.Moreover, depending on the language L, the unification of two terms, whenexists, may be unique or not.

Figure 2 shows both anti-unification (the most specific common generaliza-tion), and unification (the most general common specialization). Moreover, uni-fication and anti-unification might be unique or not depending on the structureinduced by subsumption over the terms in a language L.

A refinement operator ρ : L → ℘(L) is a function that, given a term in L,yields the set of direct (or minimal) generalizations or specializations of thatterm. In short, given a tern ψ, a refinement yields a generalization (resp. spe-cialization) ϕ such that there is no generalization (resp. specialization) betweenψ and ϕ in a language L. Formally, the refinement relation is defined as:

ψ ρ(ψ)

γ(ψ) ψ

ψ

ψ�

λ(ψ → ψ�) = 5

a) b) c)

Fig. 3. Three schemas showing a generalization refinement operator γ, a specializationrefinement operator ρ, and the distance between two terms.

Definition 1. Two feature terms hold a refinement relation ψ1 ≺ ψ2 iff

ψ1 v ψ2 ∧ @ψ′ : ψ1 @ ψ′ @ ψ2

That is to say, the relation ψ1 ≺ ψ2 holds when specializing from ψ1 to ψ2 is aminimal specialization step: there is no intermediate term ψ′ in L between ψ1

and ψ2. Specifically, a specialization refinement operator is defined as follows:

ρ(ψ) = {ψ′ ∈ L|ψ ≺ ψ′}

Whereas a generalization refinement operator is defined as follows:

γ(ψ) = {ψ′ ∈ L|ψ′ ≺ ψ}

Figure 3 illustrates the idea of both generalization and specialization refine-ment operators. Refinement operators can be used to navigate the space of termsusing search strategies, and are widely used in Inductive Logic Programming [8].In previous work, we made use of refinement operators to define similarity mea-sures for CBR systems [11]. For instance, in the vehicle example used above, ifwe have a term representing “a german minivan”, a generalization refinementoperator would return generalizations like “an european minivan”, or “a ger-man vehicle”. If we apply the generalization operator again to “an europeanminivan”, we can get terms like “a minivan”, or “an european vehicle”. A spe-cialization refinement operator would perform the opposite task, and given aterm like “a german minivan”, would return terms like “a Mercedes minivan”,or “a red german minivan”.

The length of the path between two terms ψ and ψ′, noted as λ(ψ → ψ′), isthe number of times a refinement operator has to be used to reach ψ′ from ψ.Moreover, the minimal path between two terms estimates their distance in thegeneralization space, as illustrated in Figure 3.c. Finally, the distance λ(⊥ → ψ)measures the amount of information contained in one term [11].

4 Amalgams on a Generalization Space

This section formally defines the notion of amalgam over a generalization space.Let us introduce some auxiliary definitions first. First, when two terms are notunifiable, some of their generalizations, however, may be unifiable:

ψa ψb

ψa � ψb

ψa ψb

ψa � ψb

Γ(ψb,ψa)Γ(ψa,ψb)

Fig. 4. A schema of the most specific unifiable generalizations Γ (ψa, ψb) of term ψa

with respect to ψb and Γ (ψb, ψa) of term ψb with respect to ψa.

ψa ψb

ψa � ψb

ψa � ψb

ψa = ψa � ψb

ψb = ψa � ψb

a) b)

ψa♦ψb ψa♦ψb

Fig. 5. Two schemas of the interstice space ψa♦ψb between two terms ψa and ψb: a)the general schema and b) the special case where ψa v ψb.

Definition 2. The set G of unifiable generalizations of a term ψa with respectto another term ψb is: G(ψa, ψb) = {ψ ∈ L|ψ v ψa ∧ ψ t ψb 6= >}.

Moreover, we are interested in the most specific unifiable generalizations inG. That is to say the terms in G that are greatest lower bounds of G.

Definition 3. (MUG) The set Γ of most specific unifiable generalizations(mug) of term ψa with respect to ψb is defined as:

Γ (ψa, ψb) = {ψ ∈ G(ψa, ψb)|@ψ′ ∈ G(ψa, ψb) : ψ′ @ ψ}

In other words, the most specific unifiable generalizations of a term ψa withrespect to another term ψb is the set of most specific generalizations of ψa whichunify with ψb. Notice that if they are unifiable (ψa t ψb 6= >) then Γ (ψa, ψb) ={ψa}. Figure 4 illustrates this idea.

Definition 4. (Interstice) The interstice between two unifiable terms ψa andψb, is the set of terms such that:

ψa♦ψb = {ψ ∈ L|(ψa u ψb) v ψ ∧ ψ v (ψa t ψb)}

that is to say, the set of terms that are in the ♦-shaped space (shown in Fig. 5.a)defined by ψa and ψb (metaphorically “right and left”), and their antiunification

ψa ψb

ψa � ψb

ι(ψa,ψb)

Γ(ψa,ψb)

Fig. 6. Schema showing the sets of amalgamable generalizations ι(ψa, ψb) of a term ψa

with respect to a term ψb.

ψa u ψb unification ψa t ψb (metaphorically “up and down”). Notice that whenψa and ψb are not unifiable then ψa tψb = > and there is not strict limit below(> denotes failure to unify and is the term subsumed by all terms in L).

A particular case of interest is the interstice between two terms ψa and ψbwhen ψa v ψb (see Figure 5.b): this interstice contains all the terms ψ such thatψa v ψ v ψb — i.e. all terms between ψa and ψb in the generalization space.

Out of all the terms in the interstice, we are interested in those that containthe maximum amount of information from ψa and ψb, which we will call theamalgam space.

Definition 5. The set of generalizations of a term ψa amalgamable with an-other term ψb is the set

ι(ψa, ψb) =⋃

ϕa∈Γ (ψa,ψb)

ϕa♦ψa

that is to say, for each mug of ψa with respect to ψb there is an interstice betweenψa and this mug; the terms in these interstices are amalgamables, and their unionis the set of all amalgamable generalizations of a term ψ1 with another term ψ2.Figure 6 illustrates this idea where the mug of ψa with respect to ψb is a set of asingle term, and where we can see that the terms in ι(ψa, ψb) corresponds to theterms in the interstices between ψa and the mug, i.e. in the paths going from ψato the mug.

Definition 6. (Amalgam) The amalgams of two terms ψa and ψb is the setof terms such that:

ψaΥψb = {φ ∈ L|∃ϕa ∈ ι(ψa, ψb) ∧ ∃ϕb ∈ ι(ψb, ψa) : φ = ϕa t ϕb}

We call amalgamation operation the function Υ : L × L → ℘(L) that deterinesthe set of amalgam terms for any pair of terms, and we call amalgam space of twoterms the part of the generalization space that contains their amalgams. Thus, aterm φ is an amalgam of ψa and ψb if φ is the unification of two terms ϕa and ϕbthat are amalgamable with ψb and ψa respectively. Figure 7 illustrates this idea,

ψa ψb

ψa � ψb

Γ(ψb,ψa)

ϕa ϕb

φ = ϕa � ϕb

Γ(ψa,ψb)

ψaΥψb

Fig. 7. Schema showing (in grey) the space of the amalgams ψaΥψb between two termsψa and ψb.

ψa ψb

ψa � ψb

Γ(ψb,ψa)Γ(ψa,ψb)

ψaΥψb ψa�Υψb

Fig. 8. Schema showing the set of upper bounds ψabΥψb of the space of amalgams

ψaΥψb (in grey) between two terms ψa and ψb.

showing as a grey area the space of amalgams and one point in that space as theamalgam corresponding to φ = ϕa tϕb. In the special case where two terms areunifiable (ψa tψb 6= >), then unifiers and amalgams coincide: ψaΥψb = ψa tψb.

Next we will define the upper bounds of a space of amalgams:

Definition 7. The set of upper bounds ψaΥψb of an amalgam space ψaΥψb isthe minimum set such that ∀φ ∈ ψaΥψb, ∃φ′ ∈ ψaΥψb : φ′ v φ.

The set of upper bounds can be determined as follows:

ψaΥψb = {φ ∈ ψaΥψb|∃ϕa ∈ Γ (ψa, ψb) ∧ ∃ϕb ∈ Γ (ψb, ψa) : φ = ϕa t ϕb}

That is to say, given two terms, ψa and ψb, the set of pair-wise unifications ofterms in their mugs Γ (ψa, ψb) and Γ (ψa, ψb) produces the set of upper boundsof the space of amalgams. Figure 8 shows the upper bounds of two terms in thespecial case where their mugs are unique.

Figure 9 shows an example where two trains, ψa and ψb are representedusing feature terms [2]. Each train is represented as a set of cars, where thefirst one is an engine. Each car can have a load, which is represented as a loadtype (triangles or squares), and the number of items as an integer. The twotrains do not unify, since the first car after the engine in one of them is an openhexagon, and it is a rectangle in the other one. Additionally, the number of items

Train

Engine

OpenHex

Rectangle

triangle

square

1

1

cars load

load

num

num

next

next

Train

Engine

Rectanglesquare

2

carsload

num

next

Train

Engine

OpenHex

Rectangle

triangle

square

2

1

cars load

load

num

num

next

next

Train

Engine

OpenHex

Rectangle

triangle

square

integer

1

cars load

load

num

num

next

next

Trainsquare

2

cars

load

num

Engine Car

Rectangle

ψa ψb

ϕa ∈ Γ(ψa,ψb) ϕb ∈ Γ(ψb,ψa)

φ = ϕa � ϕb

next

Fig. 9. Amalgam between two trains, represented using a feature terms.

do not match. However, the description of the first train can be generalized byremoving the restriction that the number of items loaded in the second car is1 (resulting in term ϕa), and the second train can be generalized by removingthe restriction that the rectangle car is the next car after the engine (resultingin term ϕb). After that, the two generalizations unify in a term φ, which is anamalgam of both original trains. Notice that the resulting amalgam has featuresof both trains: φ has two cars after the engine, like the first train, but the loadof the rectangle car is two squares, like in the second train.

The next section discusses how amalgams can be used for Reuse in CBR.

5 CBR Reuse through Amalgams

In this section we will discuss how the amalgam operation can be used for reuse.We’d like to emphasize that amalgam is not proposed as a complete reuse tech-nique, but as a piece that can be used inside of CBR reuse techniques.

Search in the solution space is an approach to case reuse which is commonlyused for tasks where the solution is a comple structure, such as in configuration[16] or planning tasks [1]. CBR systems which use search for reuse typically

ProblemSpace

SolutionSpaceCurrent

Problem

RetrievedCase

solutionneighborhood(search space)

SP

Fig. 10. Search-based case reuse: a single case is retrieved, and its solution neighbor-hood is explored using search.

ProblemSpace

SolutionSpaceCurrent

Problem

RetrievedCases

search space

amalgam

SP

Fig. 11. Reusing the solutions of two cases by amalgamation plus search.

retrieve a single case, and use the solution in that case as the starting point of asearch process in the solution space. The main idea is that it is expected that thesolution to the problem at hand will be close to the solution in the retrieved case.Figure 10 illustrates this idea, where given a target problem, the most similarcase (according to a similarity in the problem space) is retrieved, and then theneighborhood of the solution of the retrieved case is explored using search.

When using search as a reuse strategy, we need both a strategy to (systemat-ically) explore the solution space in a neighborhood of the retrieved solution anda criteria to stop the search. In our framework we will model this two elements:a) refinement operators (defined in Section 3) define a systematic way to traversethe solution space, b) we will assume the existence of a predicate, v(P, S), whichgiven a problem and a candidate solution, assesses whether the solution is validfor the problem at hand: v : P × S → {true, false}, where P is the problemspace, S is the solution space, and v(P, S) = true when S is a valid solution forP . For example, in a configuration task, such predicate would return true whena particular solution is a valid configuration and false when it is an invalid orincomplete configuration; in a planning domain, it would return true when thesolution is a complete plan consistent with the problem specification.

Search-based approaches to reuse are, often, limited to reusing a solutionfrom a single case. This is because search techniques require a starting point

ψa ψb

Υ(ψa,ψb) ψ

ϕa ϕb

λ(⊥ → ψb) = 10λ(⊥ → ϕb) = 88 = λ(⊥ → ϕa)

10 = λ(⊥ → ψa)

p(ψ) =8 + 8

10 + 10= 0.8

Fig. 12. An schema of the preservation degree p(ψ) of an amalgam ψ.

for the search process, which corresponds to the solution of the retrieved case.However, if we wanted to reuse solutions from more than one case, there is noclear starting point. Our proposal is to use an amalgam as the starting point tosearch for solutions to the problem at hand, as illustrated in Figure 11.

An underlying assumption of search-based reuse approaches is that it ispreferable to preserve as much from the retrieved solution as possible. 2. If weuse amalgams to generate a starting point of the search, we need a way to mea-sure how much information of the original solutions an amalgam still preserves.For that purpose, we define the preservation degree of an amalgam.

Definition 8. (Preservation Degree) Given an amalgam ψ ∈ ψaΥψb whichis the unification φ = ϕa t ϕb of two terms such that ϕa ∈ ι(ψa, ψb) and ϕb ∈ι(ψb, ψa), the preservation degree p(ψ) is defined as:

p(ψ) =λ(⊥ → ϕa) + λ(⊥ → ϕa)λ(⊥ → ψa) + λ(⊥ → ψa)

where λ(ψ → ψ′) is the number of times a refinement operator has to be used toreach ψ′ from ψ —i.e. the distance between ψ and ψ′ in the generalization space.

The preservation degree is the ratio of information preserved in the amalgamψ with respect to the information present in the original terms ψa and ψb. Theinformation preserved is measured by the addition of the information containedin the two amalgamable terms ϕa and ϕb which result in the amalgam.

As shown in Figure 12, the preservation degree is high when ψa and ψb hadto be generalized very little in order to obtain the amalgam ψ. In other words, ifthe λ-distances between ψa and ϕa and between ψb and ϕb are low, preservationis high. If ψa and ψb had to be generalized a lot before finding amalgamablegeneralizations, then the preservation degree of the resulting amalgam will below. In other words, the higher the λ-distances between ψa and ϕa and betweenψb and ϕb, the lower the preservation degree.

2 Although this assumption is only true for conservative adaptation techniques.

ψa

ψb ψc

ψ2a ∈ Υ(ψa,ψc)Υ(ψa,ψb) � ψ1

a

Fig. 13. The search space defined by the process of amalgamating a tentative solutionψa with other solutions from cases in the case base.

Using the previous notions, we can define a basic way of reusing the solutionsψa and ψb from two cases to solve a particular problem P in the following way:

1. Compute the amalgam ψ ∈ ψaΥψb with the highest preservation degree.2. Search in the neighborhood of ψ (the neighborhood can be searched using

refinement operators) until we find a solution ψ∗ such that v(P,ψ∗) = true.

This section has presented amalgam as a solution to reusing solutions frommultiple cases in the context of search-based reuse. We have focused our expla-nation on reusing solutions from two cases, but the techniques generalize easilyto reusing three or more solutions. The amalgam operation can be extended toamalgamate more than two terms in an easy way.

A different scenario could be where a CBR system initially finds a tentativesolution ψa and then, transforms this solution by adding elements from anothersolution ψb. For instance, let us consider the first cubicle of Fig. 1 as the initialsolution, and let us imagine there are certain aspects of the second cubicle thatwe would like to add to the initial solution: the result is the “amalgam cubicle” inFig. 1. If we iterate this process we have a search proces, as shown in Figure 13.Starting from ψa, the initial solution, we can amalgamate ψa with ψb (or withψc) obtaining a new solution ψ1

a (resp. ψ2a). Next, we can iterate amalgamation

over ψ1a and ψba, obtaining a search tree as shown in Fig. 13.

Thus, the amalgam operation provides a theoretical framework for combin-ing case solutions, which can be used inside of case reuse strategies in differentways, only a few of which we have discussed here. Finally, recall that the onlyassumption required for working with amalgams is that the solution space of aCBR system can be expressed as a generalization space. Tasks such as configu-ration or planning naturally suit this framework. And even classification taskscould trivially fit our framework.

6 Related Work

The notion of amalgam is closely related to that of merge in the formalism of fluidconstruction grammar (FCG) [14] in that both relax or generalize the notion of

unification. The merge operation is defined in FGC, a formalism in the family ofunification-based grammars [6, 5] used in computational linguistics. Specifically,FGC has been proposed as a framework for language emergence and evolution,a process in which new structures are created or invented. This goal requiresmore flexibility than the operations used in unification-based grammars, whichleaded to FGC defining operations like merge and extended form of unification.

The merge operation is informally defined as follows: “[...] merging a sourceexpression s and a pattern expression p means changing the source expressionsuch that it unifies with the pattern expression” [14]. That is to say, merge(p, s)is a an operation that finds a changed source expression s′ and yields as resulttheir unification (p t s′). Notice that merge is asymmetric, since the two termsbeing merged are distinguished: one is changed (because it is the source) whilethe other remains unchanged (because it is the pattern). The amalgam of twoterms ψ1 and ψ2, however, is symmetric: both terms are in equal standing, bothare “changed” by generalization, eliminating some parts, in order to obtain anamalgam by the unification of those generalizations.

Merging operators have also been studied in belief merging [7], where thegoal is to merge two knowledge bases (beliefs plus integrity constraints) whilemaintaining consistency. This approach was applied to CBR [3] by viewing casecombination in reuse as a belief merging problem. Specifically, each case is viewedas a knowledge base, and the merging is generating a new knowledge base thatpreserves the relevant integrity constraints. Integrity constraints play a similarrole to our validity predicate. However, this approach focuses on metric spaces,whereas our amalgam operation focuses on generalization spaces, and conceivingamalgam as a relaxation of the unification operation. Moreover, CBR techniquesfor adapting case solutions are also relevant to this paper, since the main researchgoal for introducing amalgams is to provide a formalization, as a search process,of reusing past cases’ solutions to build a new solution adapted to the currentproblem. We will discuss several reuse techniques that can be understood assearch processes over the solution space: local search, Abstract-Refine, composi-tional adaptation, and plan adaptation.

Compositional adaptation are reuse techniques that find new solutions frommultiple cases, which were analyzed for configuration tasks in [16], where theapproach adaptation-as-configuration is also presented. This approach has twospecific operators (compose and decompose) that achieve compositional adapta-tion in “conceptual hierarchy oriented configuration.” Compose merges multipleconcept instances that have already been configured, while Decompose gives thesubconcept instances of a given concept instance. These operations work uponis-a and part-of relations in an object-oriented hierarchy. The notions of amal-gam and interstice space are intended to formalize the process of combining partsof different case solutions in a more abstract, domain-independent way. We donot assume that the task is configuration or that an object-oriented hierarchy ispresent, only that solutions are in a generalization space. Moreover, amalgamsallows us to characterize the solution space of CBR as a search space for the pur-

poses of combining multiple case solutions into a new solution for the currentproblem.

The Abstract-Refine approach to case-based planning [1] performs reuse intwo steps: first a description is abstracted (not generalized), and second theabstract description is refined in search of an adapted description. The maindifference with our approach is that Abstract-Refine starts from one descriptionin the solution space and then explores the neighborhood of that description,while the starting point using amalgams is a term which is a combination of thesolution in more than one case.

Finally, local search uses a taxonomy of classes to perform a Generalize-Refineprocess in search for an adapted solution and, as before, the main differencefrom our approach is that it explores the neighborhood of one description. SPA(Systematic Plan Adapter) [4] is an approach for adapting plans as search in arefinement graph of plans. SPA is systematic and complete and, as local search, isbased on adapting a single plan. MPA (Multi-Plan Adapter) [12] is an extensionwhich allows for reusing multiple plans. MPA breaks the different plans intosmaller pieces, which are then recombined together. The complexity breakingthese plans into smaller pieces, however, is very high and MPA uses only aheuristic. Compared to MPA, our approach avoids the need of this previousprocess of breaking down while providing a systematic way to combine multiplesolutions into a single one.

7 Conclusions

This paper has presented a new operation between terms called amalgam. Thisoperation can be seen as a relaxation of unification. An amalgam of two termsis a new term which contains as much information from the two original termsas possible. This new term is constructed by generalizing the two original termsas little as possible, and then unifying them. Moreover, we have presented howcan the amalgam between two solutions be used for multiple solution reuse inCBR systems. The framework presented in this paper is domain-independent,and does not assume anything about the task the CBR system has to solve otherthan being able to express the solution as a term in a generalization space.

CBR systems typically only exploit similarity in the problem space, but do-mains where solutions are complex structures could also benefit from similarityin the solution space. The amalgam operation presented in this paper exploressuch idea, since the amalgam space defines a subset of terms in the solutionspace which are similar not to one but to two given solutions. We are alreadyworking on a technique implementing the amalgam operator for feature terms,but it’s out of the scope of this paper.

As future work, we’d like to continue exploring the idea of using similarityrelations in the solution space. More specifically, we plan to explore the appli-cations of the amalgam operation to develop search-based techniques for CBRReuse for specific tasks like configuration and hierarchical planning. Finally,amalgamating more than two solutions is also part of future work, since amal-

gamating more than two terms increases the number of constraints and, thus,enlarges the search space for the the techniques implementing amalgamation.

Acknowledgements. This research was partially supported by project Next-CBR (TIN2009-13692-C03-01).

References

[1] Ralph Bergmann and Wolfgang Wilke. Building and refining abstract planningcases by change of representation language. Journal of Artificial Intelligence Re-search (JAIR), 3:53–118, 1995.

[2] Bob Carpenter. Typed feature structures: an extension of first-order terms. InV. Saraswat and K. Ueda, editors, Proceedings of the International Symposiumon Logic Programming, pages 187–201, San Diego, 1991.

[3] Julien Cojan and Jean Lieber. Belief merging-based case combination. In Case-Based Reasoning Research and Development (ICCBR’09), volume 5650 of LectureNotes in Artificial Intelligence, pages 105–119, 2009.

[4] Steve Hanks and Daniel S. Weld. A domain-independent algorithm for plan adap-tation. J. Artificial Intelligence Research, 2(1):319–360, 1994.

[5] Ray Jackendoff. Foundations of Language: Brain, Meaning, Grammar, Evolution.Oxford University Press, 2002.

[6] Martin Kay. Functional unification grammar: a formalism for machine translation.In Proc. 10th Int. Conf. on Computational Linguistics, pages 75–78, Morristown,NJ, USA, 1984. Association for Computational Linguistics.

[7] S. Konieczny, J. Lang, and P. Marquis. Da2 merging operators. Artif. Intell.,157(1-2):49–79, 2004.

[8] Nada Lavrac and Saso Dzeroski. Inductive Logic Programming. Techniques andApplications. Ellis Horwood, 1994.

[9] R. Lopez De Mantaras, D. McSherry, D. Bridge, D. Leake, B. Smyth, S. Craw,B. Faltings, M. L. Maher, M. T. Cox, K. Forbus, M. Keane, A. Aamodt, andI. Watson. Retrieval, reuse, revision and retention in case-based reasoning. Knowl.Eng. Rev., 20(3):215–240, 2005.

[10] Hector Munoz-Avila and Michael Cox. Case-based plan adaptation: An analysisand review. IEEE Intelligent Systems, 23:75–81, 2007.

[11] Santiago Ontanon and Enric Plaza. On similarity measures based on a refinementlattice. In Case-Based Reasoning Research and Development (ICCBR’09), volume5650 of Lecture Notes in Artificial Intelligence, pages 240–255, 2009.

[12] Ashwin Ram and Anthony Francis. Multi-plan retrieval and adaptation in anexperience-based agent. In David B. Leake, editor, Case-Based Reasoning: Expe-riences, Lessons, and Future Directions. AAAI Press, 1996.

[13] Barry Smyth and Mark T. Keane. Adaptation-guided retrieval: questioning thesimilarity assumption in reasoning. Artificial intelligence, 102:249–293, 1998.

[14] Luc Steels and Joachim De Beule. Unify and merge in fluid construction grammar.In Symbol Grounding and Beyond, volume 4211 of Lecture Notes in ComputerScience, pages 197–223. Springer-Verlag, 2006.

[15] Wolfgang Wilke and Ralph Bergmann. Techniques and knowledge used for adap-tation during case-based problem solving. In In 11th International Conferenceon Industrial and Engineering Applications of Artificial Intelligence and ExpertSystems, IEA-98, pages 497–506. Springer, 1998.

[16] Wolfgang Wilke, Barry Smyth, and Padraig Cunningham. Using configurationtechniques for adaptation. In Case-Based Reasoning Technology, volume 1400 ofLecture Notes in Computer Science, pages 139–168. Springer-Verlag, 1998.