06.03.2013 Views

Artificial Intelligence and Soft Computing: Behavioral ... - Arteimi.info

Artificial Intelligence and Soft Computing: Behavioral ... - Arteimi.info

Artificial Intelligence and Soft Computing: Behavioral ... - Arteimi.info

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

program, all constraints are equally useful for finding viable solutions for the<br />

problem. However, there exist situations, when no solution is found that<br />

satisfies all the constraints. For h<strong>and</strong>ling these type of problems, the strengths<br />

S i of the constraints Ci are attached with them in the program clauses as<br />

presented below:<br />

P (t) ← Q1 (t), Q2(t),…..,Qm(t), S1C1(t),S2C2 (t),……,SnCn(t).<br />

Logic programs built with such type of clauses are called Hierarchical<br />

Constraint Logic Programs (HCLP) [11].<br />

We now illustrate the formulation of an HCLP <strong>and</strong> the approach to its<br />

solution for the problem of editing a table on a computer screen in order to<br />

keep it visually appealing.<br />

Here, the spacing between two successive lines is a variable, whose<br />

minimum value, for obvious reason, is greater than zero. However, we want it<br />

to be less than 10. We also prefer that the table fit on a single page of 30<br />

lines. Further, there could be a default space of 5 lines, i.e., if other<br />

constraints are satisfiable, then one may attempt to satisfy the default<br />

constraint.<br />

Let us define the strength of the constraints into following 4 levels,<br />

essential,<br />

strongly preferred,<br />

preferred,<br />

default.<br />

The logic program for the above problem is presented below.<br />

Table (page-length, type-size, no-of-lines, space) ←<br />

essential (space + type-size) * no-of-lines = page-length,<br />

essential space >0,<br />

strongly preferred space < 10,<br />

preferred page-length

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!