Information and Communication Technology Seminar, Vol. 1 No. 1, August 2005
ISSN 1858-1633 2005 ICTS 56
similarity algorithm; finally, Section 6 and section 7 presents the experiment result and the conclusion
respectively.
2. MULTI AGENT SYSTEM MAS
MAS must have several aspects to enable agents to exchange information among them. Among many
aspects of agent in MAS, communication, coordination and negotiation are the essential
characteristics of MAS. Many researches involved in this three area of communication, coordination, and
negotiation aspects. After they have communication among them, they need to coordinate their activities
and negotiate their interest to solve problem without confliction [9].
ACORN Agent-based Community Oriented Routing Network as one of multi agent system use
community based approach for searching distribution and management information in network [11]. The
agents in ACORN are autonomous agent who acts autonomously and make their own decision on the
owner behalf.
Figure 1. Virtual market [4, 11]
One capabilities of ACORN architecture is to provide information sharing among agents. Café is a
place where agent can share its information among themselves as shown in figure 1. Figure 1 show the
virtual market adopted from [4, 11]. Here, the virtual market is the place to exchange information among
agent buyer and agent seller.
For communication between agent buyer and agent seller, there is a café manager who manages the
information exchange. At a certain time, all agents give their information to the café manager. The café
manager compares all data, sharing out any relevant data to agents who would find it of use. Moreover, the
café manager maintains the mingling of agents in the café. Since the sharing information by café manager,
each agent will know about other agents and it can contacts interested agent to learn more.
3. A WEIGHTED-TREE SIMILARITY ALGORITHMS
In ACORN, information carried by agents is represented as a set of key words with their weights
[11]. In the real world cases, such flat information can not give the whole description about the agent’s
preferences. To solve the problem, bhasvar propose the form of weigted tree to represent the agent
preferences [11, 13]. The description of seller and buyer agents’s preferences are represented using node-
labelled, arc-labelled, arc-weighted trees. The tree has been suitably applied as representation of knowledge
of an agent. Using similarity tree algorithms, we can set up the matching process between two trees and
find the similarity between them. Then, the pairing and the negotiation process would be the next process
between two agents with best similarity to make an agreement.
In the arc-labeled arc weighted tree, the arcs will always be labeled in alphabetical order. Moreover,
bold font is used to difference between arc labels and node labels as shown in figure 2.
Figure 2. Example trees of garment item
Figure 2 also shows the example trees of garment item. The tree brings three types of information: Age,
Occasion, and Type of garment. Each has weighted information 0.3, 0.3, and 0.4 respectively.
The depth of the tree is not limit with one or several level. The depth and the complexity of the tree
can be vary depend on the information given. In the real world application, an agent can bring more
complex such as shown in figure 4.
cterm _r n=”Age” w=”0.3”
indAdultind_r _r n=”Occasion” w=”0.3”
indFormalind_r _r n=”Type” w=”0.4”
indShirtind_r
cterm
Garment
Adult Formal T-Shirt
Age
0.3
Occasion 0.3
Type 0.4
Garment
Adult Casual Shirt
Age 0.3 Occasion
0.3 Type
0.4
Shirt Garment
Adult Formal
Age 0.3 Occasion
0.3 Type
0.4
a b
c .
.
Buyer 1 Buyer 2
Buyer n
. .
Seller 1 Seller 2
Seller n
Virtual market
Shape Matching Using Thin-Plate Splines Incorporated to Extended Weighted-Tree Similarity Algorithm for Agent Matching in Virtual Market – Budianto Riyanarto
Sarno
ISSN 1858-1633 2005 ICTS 57
Figure 3. The symbolic tree representations of figure 2a.
Bhavsar et.al. then used RuleML to represent the tree in object oriented model [4, 5, 13]. Element _r is a
metarole contains the names and weights of arc labels see figure 3.
For similarity algorithms, the weighted-tree similarity algorithm recursively traverses every pair of
trees and calculate the similarity on each node to find the similarity between two trees. The algorithm
compute the average of weights from two trees,
2
i i
w w
+
and obtain the similarity s
i
of tree t
1
and tree t
2
recursively by multiply an arc function ASi and the averaged weight. Then Sum of
2
i i
i
w w
S A
+
is divide by sum of all averaged weights [4]:
∑ ∑
+ +
2 2
i i
i i
i
w w
w w
S A
1 Later the weighted-tree similarity algorithm is
refined by applying weight variance on the selection of the most preferable agent when several agents have
the same similarity [13]. Here is the formula of weighted-tree similarity algorithm with weight
variance:
∑
− +
− =
n i
i i
i
n w
w w
w iance
1 2
2
var
2
where 2
i i
i
w w
w −
= and n = number of weight
pairs. Using variance to choose the preferable agents is done by selecting the smaller variance.
4. NODE SHAPE IN THE ARC- LABELED ARC-WEIGHTED TREES
In this research, we build the arc-labeled arc- weighted tree for garment as seen in figure 4 and
include node shape to unable weighted-tree similarity algorithm to bring information about the shape of a
cloth or dress in the trees. With the arc-labeled arc- weighted tree, a buyerseller can describe his
information not only using node label but also using node shape [8].
First, Let us consider a buyer who wants to buy a cloth with specific shape instead of textual
information. Using the previous arc-labeled arc- weighted tree [6], he would find difficulties to
describe the shape using node label. Yet it is easy to describe the shape of a cloth using node shape.
In figure 4, the tree show garment information which employ two node shapes for information about
the back and the front shape of a cloth. After applying node shape, we need an algorithm to match between
two node shapes.
The shape matching using shape context with Thin-Plate splines used in this research is employed to
the problem [1, 2, 3, 4]. The next section will describe briefly about shape matching algorithm.
Figure 4. Garment tree as representation of user’s preferences
5. NODE SHAPE AND SHAPE MATCHING WITH THIN PLATE
SPLINES
We propose the use of shape matching for the tree describing garment. Shape matching techniques has
been use in many applications such as image information retrieval and image recognition.
According to Russel et.al., shape matching in computer vision can be categorized into two
approaches: a feature-based, and b brightness- based [12].
In this research, we propose the feature-based approach using shape context matching developed by
Belongie et.al. [2, 3]. In Shape context matching, a set of points defines the internal or external contour of
shape is used. Figure 5 shows the example of set point from shape of a cloth. Given set P = {p
1
, p
2
,..,p
n
}, p
i
∈ R
2
, each point p
i
in the first shape is matched to the point q
i
on the second shape which have the best correspondence each other. To match between two
correspondence points, we use the shape context, which plays an important role for one-to-one point
matching. Suppose we have a point used as a reference point, n-1 vector can be formed from the
reference point. Now we can identify the distribution over relative positions from the reference point. The
coarse histogram h
i
of the relative coordinated of the remaining n-1 points is employed to identify the
distribution. The coarse histogram h
i
is defined as [2, 3]:
H
i
= {q ≠p
i
: q-p
i
∈ bin k}
3
Age Avail-
ability Fabric
Gender Occasion
Price Type
{Adult, Baby,
…}
{1 day, 2 days,
…}
{Cotton, Silk, …}
{Cotton, Silk, …}
Major Minor
{M, L} {Forma,
Casual, …}
{Jacket, t-shirt, …}
Garment
Button Style
Front Shape
Back Shape
Sleeve Collar
{Cheap, …}
{Circle, Square,
…}
{V-Style, Circle,
…}
{Long, Short,
…}
Information and Communication Technology Seminar, Vol. 1 No. 1, August 2005
ISSN 1858-1633 2005 ICTS 58
Figure 5. Examples of edge pixels generated from cloth
Histogram h
i
is called to be the shape context of p
i
. The shape context is counted using the log polar
coordinate with the diagram of log polar bins see figure 6, simply by counted the number of pixel in
each the polar bins [2, 3].
Figure 6. Diagram of Log polar bins used for counting the shape context
After we finished calculating all histogram for each p
i
in the first shape and the second shape, we need to find cost function C
ij
= C p
i
, q
j
where p
i
is a point in the first shape and q
j
is a point in the second shape. Based on the histogram, now we can compute
the matching costs using Chi Squared Test χ
2
[2,3]:
∑
=
+ −
=
n k
j i
j i
ij
k h
k h
k h
k h
C
1 2
] [
2 1
4 where h
i
k and h
j
k denote the K-bin normalized histogram at p
i
and q
i
, respectively. For all pair i and j, we compute the cost function C
ij
in order to find the minimal total cost of matching subject to the
constraint that the matching be one-to-one point from two shapes. Figure 7 shows the example of one-to-one
point from shape e and shape g from figure 9.
Figure 7. Examples of correspondence pixels from two cloths.
The one-to-one point from two shapes is used to proceed a best transformation using the Thin-Plate
splines TPS model [6]. TPS interpolation fx,y has the form [2, 3, 6]:
∑
=
− +
+ +
=
n i
i i
i y
x
y x
y x
U w
y a
x a
a y
x f
1 1
, ,
,
5 where Ur is the kernel function defined by
2 2
log r
r r
U =
and
= U
.
Figure 8. The matching process of shape matching between shape a and b from figure 8
Several papers about thin-plate splines by Bookstein [6], and Belongie [2, 3] give more detail
information about thin-plate splines transformation. The matching process between two shapes is
summarized in figure 8. Top left image is the 1
st
iteration, top right image is the 2
nd
iteration, bottom left image is the 3
rd
iteration and the bottom right image is the 4
th
iteration after applying thin-plate splines on the correspondence points in shape
contexts. The grid points give us the illustration of the transformation made during iteration.
Similarity between two node shapes is counted based on the shape context distance. Thus, we should
Shape Matching Using Thin-Plate Splines Incorporated to Extended Weighted-Tree Similarity Algorithm for Agent Matching in Virtual Market – Budianto Riyanarto
Sarno
ISSN 1858-1633 2005 ICTS 59
measure the context distance DP,Q between shapes P and Q as the sum of shape context matching costs
over the best matching points and , as follows [2, 3]:
be P
p Q
q P
p Q
q
D q
T p
C n
q T
p C
n Q
P D
+ +
=
∑ ∑
∈ ∈
∈ ∈
, min
arg 1
, min
arg 1
8 .
,
6 where
, Q
P D
be
is the effort of transformation done to adjust the shapes. For finding the similarity
between two shapes, we modify the equation 6 by subtract one with the context distance D P, Q such
that the result will reflect the similarity, as follows:
, 1
, Q
P D
Q P
Sim −
=
7 After we have found the similarity between pair-
node shapes in the trees, the result will be used to compute the similarity of the tree.
5. RESULTS