566
modelling(e.g.testingofbacktrackingalgorithms[3]
or,treatingtheproblemasavariationofaTravelling
SalesmanProblem[4]).
The AI courses at the universities are provided
based on standard sources such as e.g. [5], however
many different approaches to teaching AI can be
found around the world.
Several introductory
programming courses use problems in AI as
motivating examples [6][7]; the AI is often being
taught through the games to attract more students
intocomputing[8][9].Motivationisakeyfactorinthe
learning process [10]. To make students properly
motivated, specialized education software tools can
bedeveloped
andusedtodemonstrateselectedsearch
strategiesthroughtypicalproblemssuchassearching
path through the maze, shortest path in a graph,
Sudoku, etc. In this paper an authoring tool, called
“Labyrinth”, is used as a working example. The
Labyrinthapplicationhasbeenimplementedinboth
declarative and procedural ways (SWI
Prolog and
Java)andhelpstodemonstrateproblemsolvingand
toobtainstatisticdataneededforfurtherevaluation.
The set of tested methods includes the most usual
searchalgorithmswhichmaybetested,observedand
theirpropertiescomparednotonlytheoretically,but
also practically. Performance of particular searching
methods in
a state space is evaluated based on the
common criteria, i.e. completeness, time complexity,
spacecomplexityandoptimality.
2
DESIGNOFTHEAUTHORINGSOFTWARE
SYSTEM
2.1
GeneralFormulationoftheTask
Personswhowanttoknowhowtosolve tasksfrom
above categories must master perceptual, linguistic
and common sense skills, followed by skills
characterizing the application domain. On the
ontologicallevelaproblem‐solverconsistsofthefive
majorelements[11]:
1
Aproblem‐solvinggoal.
2
Domaindatadescribingtheprobleminstance.
3
Problem‐solvingstate.
4
Problemsolvingknowledge.
5
Domainfactualknowledge.
The emphasis is given to search as the primary
techniqueusedinComputerScience andOperations
Research for solving computation‐intensive
combinatorialoptimizationproblems,typicallythose
intheNP‐hardclass[12].Statespacesearchinghasa
numberofinterestingproperties,suchastheabilityto
guarantee optimal
solutions and the possibility of
exploiting domain knowledge to guide the search
[13]. The core of the search problems isʺHow to
controlthesearch?“.Atthebeginningthereisgiven:
1
AnInitialStatethattheproblemstartsin.
2
Asetofoperatorsthatcanbetaken.
3
A Goal State (or a set of Goal States) that the
problemendsin.
4
Optionally, paths Cost function to solve the
problem.
The task is formulated as finding a sequence of
operators leading from the Initial State to the Goal
State.Thesearchspaceisatree(graph)definedbythe
initialstateandtheoperators.Thesearchtree(graph)
isanexplicittreegenerated
duringthesearchbythe
control strategy. Different search algorithms use
different search strategies. Generally, they may be
either uninformed (make no use of domain
knowledge‐alsoknownasblindsearch)orinformed
(using some rule(s) of thumb). The task could be
expressedasaGeneralSearchalgorithm,consistingof
thefollowingsteps:
1
Initializethesearchtreewiththeinitialstate.
2
Reportfailureifsearchtreeisempty.
3
Movetoaleafnodeaccordingtoastrategy.
4
Readyifagoalstate.
5
Expandthecurrentstatebygeneratingsuccessors
tothecurrentstate.Addthemtothesearchtreeas
leaves.
6
Repeatfrom2.
For the sake of simplicity the more formal
(mathematical) definitions of algorithms and state
spaces have been intentionally avoided here since
they are available in many AI textbooks. Generally,
thesearchstrategiesapplythefollowingfourcriteria:
1
Completeness:isfindingasolutionguaranteed?
2
Timecomplexity:Howlongdotheytakeinsearch
time?(Whatisanumberofgeneratednodes?).
3
Space complexity: Storage required? (How many
nodesaretobestoredinamemory?).
4
Optimality:Whenthereareseveralsolutions,does
itfindthebestone?
2.2
TheProblem
Representingsearchalgorithmsthroughthestateofa
vertexisdifficultsinceitisconstantlychanging(e.g.a
vertex can be unexplored, open or closed) and the
audienceeasilylosesthetime‐linesequence.Thusthe
problem has two levels, one that is technical and
anotherthatispsychological[14].
There
are different approaches how to cope with
the technical side of the problem – to use colourful
figures; to visualize a changing tree through
multimedia means (animations, videos); or to apply
interactive programs solving particular problems.
Very often animated figures are used as a part of
presentations, where the algorithms
and the graphs
can be seen developed step‐by‐step, differentiating
statechangesbydifferentcolours,symbols,etc.What
is more, various specialized software tools are
availabletovisualizeexplainedsearchalgorithms..
Thepsychologicalleveloftheproblemmayresult
from requirements to use programming knowledge
whencreatingastate‐space
representationalongwith
the attached data structures and selecting the
appropriatealgorithmthatisrecursiveinmanycases.
Since the length of the solution is not determinable
beforehand, its storing requires a dynamic data
structure[14].
Potential solution of both sides of the learning
problem can be seen in the
two‐steps approach: the
first step consists in learning a theory together with
practicalapplicationofselectedsearchalgorithmstoa
certain problem, using pre‐designed software tools
forboth managedand self‐studyevaluation ofbasic
properties. The seconds step covers step‐by‐step
solution (programming) of problems with gradually