Artificial Intelligence Search Algorithms in Travel Planning
Artificial Intelligence Search Algorithms in Travel Planning
A study performed on search algorithms and its use in travel planning with the Cooperation of YEStravel, travel planner. This Master thesis is 20 weeks work done from January 06 to June 06. By Kamran Zaheer [email protected] Department of Computer sciences and Electronics Mlardalen University Vsters Sweden. .
Examiner : Peter Funk Supervisors : 1st Mobyen Ahmed, 2nd Peter Funk Industrial Supervisor :Sandy Li Shenzhi
-0
Abstract
Problem solving in Artificial Intelligence (AI) may be characterized as a systematic search through a range of possible actions in order to reach some predefined goal or solution. In AI problem solving by search algorithms is quite common technique. In the coming age of AI it will have big impact on the technologies of the robotics and path finding. It is also widely used in the travel planning. This thesis deals with the different kinds of search algorithms of Artificial intelligence used in travel planning. It describes their structures and their use in travel planning .Heuristic search algorithms and their uses in AI are focused. Travel planning plays major role in humans activities but is complex part. AI has also decreased that complexity .HTN planning technique which is better step for the advancement of travel planning. Heracles which is interactive data driven constraint based travel planners has played a significant role in the field of travel planning. Both Heracles are discussed with their properties and functionality. The information agents and their working used in this travel planner are also discussed. Future work being done in this field and the benefits of that constraint based travel planner are also highlighted in the thesis.
-1
Table of Contents
1 Introduction ........................................................................................................................... 6 1.1 Background ............................................................................................................................7 1.1.1Problem Solving and Search ............................................................................................7 2 Uniformed Search Strategies.............................................................................................. 10 2.1 Brute force or Blind search methods....................................................................................10 2.2 Breadth First Search .............................................................................................................10 2.3 Depth First Search................................................................................................................11 2.4 DFS Iterative Deepening ......................................................................................................12 2.5 Greedy Search ......................................................................................................................12 2.6 Bidirectional Search .............................................................................................................13 2.7 Iterative deepening ...............................................................................................................14 3 Heuristic Search .................................................................................................................. 14 3.1 A * Search ............................................................................................................................16 3.2 Hill Climbing Search..........................................................................................................16 3.2.1 Stochastic Hill climbing ................................................................................................17 3.2.2 First choice Hill climbing..............................................................................................18 3.3.3 Random Restart Hill Climbing......................................................................................18 3.3 Simulated Annealing ............................................................................................................18 3.4 Generate and Test search....................................................................................................19 3.5 Back Tracking ......................................................................................................................20 3.6 Beam Search.........................................................................................................................21 3.7 Best First Search..................................................................................................................22 3.8 Branch and Bound................................................................................................................22 3.9 Constraint Search .................................................................................................................23 3.9.1 Constraint Satisfaction search .......................................................................................23 3.10 Means End Analysis...........................................................................................................24 4 Asynchronous Search Algorithm.................................................................................. 24 4.1Asynchronous Dynamic Programming .............................................................................25 4.2Learning Real time A* ......................................................................................................25 4.3Real time A*......................................................................................................................25 4.4Real time multi agent ........................................................................................................25 5 Other Search Techniques ................................................................................................... 26 5.1 Tabu Search......................................................................................................................26 5.2 Island Search ....................................................................................................................28 5.3 Semantic Search Algorithm .............................................................................................28 6 Comparison of Different Search Algorithms.................................................................. 28 6.1 Measuring Problem Solving Performance .......................................................................28 7 Implementation of AI Search Algorithms......................................................................... 30 7.1 HTN Planning ......................................................................................................................30 -2
7.2.1 Monitoring Travel Status ..................................................................................................35 7.2.2 Constraint Network Representation ..................................................................................38 7.3 Information Agents ..............................................................................................................39 7.3.1 Defining Information Agent..........................................................................................40 7.3.2Accessing Web sources ..................................................................................................40 7.3.3 Monitoring Web sources ...............................................................................................40 7.4 Programming of Search Algorithms ................................................................................41 8 Evaluation of Constraint Network by Heracles ............................................................... 43 8.1 Advantages of Heracles........................................................................................................43 8.2 Comparison with other Travel Planners...............................................................................44 8.3 Challenges for Intelligent system in tourism........................................................................44 8.4 Limitations of Heracles ........................................................................................................45 8.5 Opportunities for research ....................................................................................................45 8.6 Future of AI planning...........................................................................................................46 9 Discussion............................................................................................................................. 46 10 Summary and Conclusion .............................................................................................. 47 11 References ....................................................................................................................... 48
-3
Acknowledgement
I am extremely thankful to my programme supervisor professor Peter Funk and his assistant Mobyen Ahmad who guided my completely about my programme and thesis completion. They gave me full support when I needed. I am also thankful to founder and CEO of YEStravel (YEStravel.com) Sandy Li Shenzhi who gave us ideas to do research on travel planning. I express my gratitude to also my family and friends who encouraged me every time for the completion of my studies.
-4
List f Figures
Figure 1 The Road map of Romania [14] ........................................................................................9 Figure 2 Breadth First Search [22] ................................................................................................11 Figure 3 Depth First Search [11].................................................................................................11 Figure 4 Greedy Search [4] ............................................................................................................13 Figure 5 Bidirectional Search [2] ...................................................................................................14 Figure 6 Hill climbing search [9] ................................................................................................18 Figure 7 Working of Generate and test search algorithm ..............................................................20 Figure 8 Expansion of nodes in beam search [21] .........................................................................21 Figure 9 Means end analysis states ............................................................................................24 Figure 10 include dependency graph for tabu search.....................................................................27 Figure 11methods for travelling from one location to another and how they might be the task of travelling from the Maryland to MIT. ............................................................................................31 Figure 12 status information monitoring agent [16] ......................................................................41
List of Tables
Table 1 Comparison of different search algorithms.......................................................................29 Table 2 A comparison of travel planning approaches..................................................................44
-5
1 Introduction
An algorithm is a set of instructions which describes how to solve the problem .As far as search algorithm is concerned it is a global problem solving mechanism in artificial intelligence. Search algorithms are used for a multitude of AI tasks one of them is path finding .AI area of search is very much connected to problem solving. AI has investigated search methods that allow one to solve path planning problems in large domains. Having formulated problems we need to solve them and it is done by searching through the state space during this process search tree is generated by taking initial state and applying the successive function to it. Most of the researches on search methods have studied how to solve one-shot path-planning problems. Search is mostly a repetitive process therefore many AI systems replan from scratch and it solves the path planning problem independently. The problem becomes more severe when changes occur during planning. Fortunately the changes to the path planning problems are usually small. The problems that have been addressed by AI search algorithms are fall into three general classes: single-agent path finding problems, two player games and constraint-satisfaction problem [1]. Heuristic search methods promise to find the shortest path for path planning problems that are faster than uniformed search methods. On the other hand incremental search methods promise to find shortest path for series of similar path planning problem faster that is possible by solving each path planning problem from scratch. Travel planning is now becoming a vast field and for economy of any country it plays vital role. Artificial intelligence is playing major role in this field. Many travel planners using heuristic and uniformed algorithms are giving better results than the ordinary travel planners. Both search and graph AI algorithms are used in the travel planning which make any travel planner user friendly and time saving. In this thesis main subject has been the search algorithms used in the travel planning search for better routes, destination and transport system giving enabling the customer to build his best travel plan for his desired trip. First chapter contains background of the thesis and illustrates it with example. Second chapter contains different uniformed search algorithms with diagrams. Similarly third chapter describes heuristic search strategies and their use in travel planning with different kind of heuristic search algorithms. Other kinds of search algorithms are discussed in chapter 5. Problem solving algorithms are rated by their performance and this performance is
-6
measured by some characteristics which are mentioned in chapter 6. HTN planning which is good example of search algorithms in travel planning is discussed in better way with two different examples in 7th chapter Constraints are important elements for problem solving and in future they will be widely used in the travel planning. Its better example is Heracles which is constraint based travel planner and different kinds of intelligent are used in 8th chapter further more the advantages and comparison of Heracles with other travel planner is also discussed. Report is summarized and concluded in 9th chapter. Finally good references which helped me for my research on travel planning, both web and book references are mentioned in last chapter with their authors.
1.1 Background
Newell and Simon in 1976 defined that intelligent behaviours come from the manipulation of symbol entities that represent other entities and that process by which intelligence arises is called heuristic search.
-7
A path cost is a function that assigns a numeric cost to each path. The problem solving agents choose a cost that reflects its own performance measure, e.g. path distance between the cities.
1.1.2 Problem Solving Agents Problem solving agents decide what to do by finding sequence of action that lead to desirable states. The simplest agents which have been described so far are reflex agents. They use direct mapping from states to actions and are unsuitable for very large mappings. These are one kind of goal based agents. Problem solving agents find action sequences that lead to desirable state. Example In Romania One holiday in Romania, we are currently in Arad and flight leaves tomorrow from Bucharest. Formulation of goal is that be in Bucharest in time and in formulation of problem is that States: Being in various cities of Romania Initial state of agent =In(Arad) Actions: Drive between cities Finding solution by sequence of cities for example Arad, Fagaras, Sibiu and Bucharest and in the last solution is executed. In first step we will look at the process of problem formulation then take a look how to search. The basic idea is to explore search space by generating successors of already explored states. successor (In(Arad)returns {<Go(Sibu),In(Sibu)>, <Go(Timisoara),In(Timisoara)>, <Go(Zerind), In(Zerind)> } Goal Test Determines if the state is in the goal In(Bucharest) Path Cost
-8
Assigns numeric cost to each path which allows determining best .Possible metrics are distance, time etc.
There are four basic kind of agent program that embody the principles underlying almost all intelligent systems: Simple reflex agents Model based reflex agents Goal based agents Utility based agents 1.1.3 Problem Formulation. A PF is a process of deciding what actions or states to consider given a goal. We again take the example of Romanian trip, for the formulation of the problem of getting to Bucharest in terms of initial state, successor function, goal test and path cost. This formulation seems reasonable yet it omits a great many aspects of the real world. Compare the simple state description we have chosen, ln (Arad) to an actual cross-country trip, where the state of the world includes so many things: the travelling companions, which programme is on the radio, the scenery of the window whether there are any laws of enforcement officers nearby, how far it is to the next rest shop, the condition of the road, the weather and so on. All these considerations are left out of our state descriptions because they are irrelevant to the problem of finding a route to Bucharest. The process of removing detail from a representation is called abstraction [4].A driving action has
-9
many effects. Besides changing the location of vehicle and its occupants, it takes up time, generates pollution and consumes fuel
- 10
is O (bd) the asymptotic time complexity of breadth first search. [2].Breadth first search is a complete algorithm with exponential time and space complexity.
- 11
far as its disadvantages are concerned it is not optimal, susceptible to false start and the time complexity O (bm) is same for space complexity [3].
a
h=2 h=1 h=1 h=1 h=0
b c d e g
g h i
- 13
3 Heuristic Search
Heuristic is a problem specific knowledge that decreases expected search efforts. It is a technique which some times work but not always. Heuristic search algorithms use information about the problem to help directing the path through the search space. These searches use some functions that estimate the cost from the current state to the goal presuming that such function is efficient. Generally heuristic incorporates domain knowledge to improve efficiency over blind search
- 14
[6].In AI heuristic has a general meaning and also a more specialized technical meaning. Generally a term heuristic is used for any advice that is effective but is not guaranteed to work in every case [5]. Example In this example of heuristic we consider the problem of driving across the country if you think each of each city as state in this problem domain, and each highway connecting cities as an operator that can be applied, we can treat this problem in terms of model of problem space. Suppose for some reason we are in Oklohama, Nebraska and driving towards Boston, Massachusetts. We have to choose which highway to take out of town. If we want to apply Breadth first technique to this problem we would consider all of the highways out of Omaha and then consider all of the highways from the place they lead to. So we would consider 80 going east towards Illions and west towards the 1-76 junction we will consider 1-29 going north towards Sioux city, as well as going south towards Kansas city. From Kansas City we would consider 170 towards St Louis, as well as east, heading into Kansas. At each city or junction we would consider all the possible ways to go from there. Clearly we would spend a lot of time considering stupid routes. Clearly what we want to do in this case is to consider roads that at least head north or east that go roughly towards Boston. This is the heuristic because it might be the case that we will have to choose roads some times that dont go directly towards our goal. For example when we go to Chicago we would have to head south for a while to get around the Lake Michigan. Still it is much better than heading into South Dakota [12] . We suppose that instead of knowledge that Boston is north and east of Omaha, we know that distance from each city in the county to Boston. We have the following information Omaha to Boston Kansas to Boston Wichita to Boston Chicago to Boston Souix city to Boston 1463 miles 1437 miles 1627 miles 1015 miles 1570 miles
So by this table it can be easy for us to decide which route to choose. Heading to Kansas City gets us a bit closer, but if we take 1-80 to Chicago, we will be much closer. Another heuristic in the driving domain is to choose the highway that takes us to the city that s closest to our goal but
- 15
again it will not work and for the same reasons lakes , mountains, tornadoes can make what might seems to be the shortest route which is less attractive [12]. Following are main kinds of heuristic search.
3.1 A * Search
A* is a cornerstone name of many AI systems and has been used since it was developed in 1968[1] by Peter Hart, Nils Nilsson and Betram Rapahel. It is combination of Dijksra,s algorithm and best first search. It can be used to solve much kinds of problems. A* search finds the shortest path through a search space to goal state using heuristic function. This technique finds minimal cost solutions and is also directed to a goal state called A* search. The A* algorithm also finds the lowest cost path between the start and goal state, where changing from one state to another requires some cost. A*requires a heuristic function to evaluate the cost path that passes through the particular state [2].It is very good search method but with complexity problems. This algorithm is complete if the branching factor is finite and every action has fixed cost. A* requires heuristic function to evaluate the cost of path that passes through the particular state. It is defined by the following formula [2] f(n)= g(n)+h(n) [2] Where g(n) is the cost of the path from the start state to node n and h(n) is the cost of path from node n to the goal state. The speed of execution of A* search is highly dependant on the accuracy of the heuristic algorithm that is used to compute h(n). A* search is both complete and optimal. Thus if we are trying to find the cheapest solution a reasonable thing to try first is the node with the lowest value of g(n)+h(n). It turns out that this strategy is more than just reasonable which provides that the heuristic function h (n).
- 16
question cannot be answered[20].This techniques works but as it uses local information thats why it can be fooled .The algorithm does not maintain a search tree, so the current node data structure need only record the state and its objective function value [4]. In this algorithm only a local state is considered when making a decision of which node is to expand next When a node is entered all of its successors nodes have a heuristic function applied to them The successor node with the most desirable result is chosen for traversal [3].Hill climbing sometimes called greedy local search because it catches a good neighbour state without thinking ahead about where to go next. Hill climbing often makes very rapid progress towards a solution because it is usually quite easy to improve a bad state. Hill climbing is best suited to the problems where the heuristic gradually improve the closer it gets to the solution it works badly where there are sharp drop-offs. It assumes that local improvement will lead to global improvement. There are some reasons by which hill climbing often gets suck which are stated below.
Local Maxima A local maximum is the peak that is higher than each of its neighbouring states, but lower than the global maximum. Hill climbing algorithms that reach the vicinity of local maximum will be drawn upwards towards the peak, but then will be stuck with nowhere else to go. Ridges Steps of east, north south and west may go down but the step to north west may go up. Ridges result in a sequence of local maxima that is very difficult for greedy algorithm to navigate [4]. Plateaus The space has a broad flat area that gives the search algorithm no direction (random walk). Many variants of hill climbing have also been invented which are described below.
- 17
Figure 6
the system temperature. It escapes local maxima by allowing some bad moves but gradually decrease their frequency. Properties If T decreases slowly enough, then simulated annealing search will find a local optimum with probability approaching 1. It is also widely used in VLSI layout, airline scheduling etc.
- 19
Solution set
Problem
Generate Solution
Is match
Yes
Result
Thrashing Thrashing occurs because the standard BT algorithm does not identify the main reason of the conflict or problem i.e., conflicting variables. That is why search in different parts of the space keeps failing for the same reason .Intelligent back tracking can reduce or finish thrashing. It is
- 20
done by the scheme on which backtracking is done directly to the variable that cause the failure[17]. Redundant work Second disadvantage of backtracking is to perform redundant work. Even if the conflicting values of the variables are identified during the intelligent backtracking they are not recalled for the immediate detection of the same problem in a subsequent computation. There is one method which is backtracking based and that eliminates both above disadvantages that method is called dependency directed backtracking and it is used truth maintenance system. Conflict Detection The last drawback of backtracking algorithm is that it detects the conflict too late it means it does not detect the conflict too fast before its occurrence i.e., it detects after assigning the values to all the variables of the conflicting constraint. It can be avoid by applying consistency techniques to forward check the possible conflicts.
- 21
- 22
optimization problems over a search that can be presented as the leaves of search tree. The usual technique for eliminating the sub trees from the search tree is called pruning. The load balancing aspects for branch and bound algorithms make it parallelization difficult. The primary difficulty being that usual assumption requires no prior information about the likely location of the search target. For example travelling sales man problem we decompose our set of choice into set of sets, in each set of which we have taken different route of the current city. We continue to decompose until we have complete paths in the graph. In the mean while if we are decomposing the sets, we find two paths that lead to the same node. We can eliminate the more expensive one [5]. The reason of success of the branch and bound approach is limited to small size networks. In the problems of large networks, where the solution search space grows exponentially with the scale of the network, the approach becomes relatively prohibitive. In the worst case, given a network design problem with n binary variables, it would require the solution of 2n number of solutions of the traffic assignment routine [13].
- 23
Pre plan
Action
Post plan
Initial state
Figure 9
Mid state 1
Mid state 2
Target state
- 24
4.3Real time A*
Real time A* algorithm produces an action every k second, where k depends upon the depth of the search horizon. RTA* will find a path to solution if there exist one and the search graph can be accessed easily [6]. It is not necessary that the path will be optimal. Though RTA* will make those decisions which are locally optimal.
- 25
To describe the working of Tabu search a combinational optimization problem is presented in the following form. Minimize c(x) x X in Rn
c(x) is the objective function x X is the constraint Tabu search elements are listed below Tabu List T Aspiration Level Strategic Oscillation Intermediate and long term memory
Tabu List T
- 26
The tabu list encloses the most recent moves. Its main function is to stop main move in the period of time to prevent cycling and avoid local optimum [13]. Aspiration Level Aspiration level use is one of the main functions of Tabu search. If the objective value c(s(y)) of move s(y) is less than of pre specified level A(s,y) then the Tabu status of the move may be overridden Strategic Oscillation SO is also an important feature of Tabu search, referring to the search state where the moves are allowed to enter the infeasible region. The search oscillates back and forth between the feasible and infeasible region. Intermediate and long term memory The intermediate memory function records features that are common to a set of best trial solutions during a specific period of the search. The search then continues using these common features as a heuristic to identify new solution. Secondly the long term memory function diversifies the solution from the current search stage by using a heuristic which is usually generated from the search [13].
stdio.h
stdlib.h
Time.h
math.h
tabu.h
fitness.h
tabu_search/fitness.c
- 27
2- Optimality Does that strategy find the optimal solution? This column indicates that whether or not the solution found will always be the optimal solution. - 28
3- Time Complexity How long does it take to find a solution? It is the order of complexity search time by algorithm expressed as a function. used
4- Space Complexity How much memory is needed to perform the search? This column is the order of complexity memory requirements of algorithm also expressed as a function. The comparison among different search algorithms by these factors is shown by the table below. Algorithm Breadth First Depth First DF iterative deepening Bidirectional Hill climbing Best First A* ID A* Beam Search Means End Generate & Test Time O(bd) O(bd) O(bd) O(bd/2) O(bd) O(bd) O(bd) O(bd) O(nd) O(bd) O(((bd!)/((bdd)!))/2) O(bd) Memory O(bd) O(d) O(d) O(bd/2) O(1)-O(bd) O(bd) O(bd) O(d) O(nd) O(bd) O(d) O(1) O(bd) O(bd) Complete Yes No Yes Yes No Yes Yes Yes No No Yes Yes Yes Yes Optimal Yes No Yes Yes No No Yes Yes No No No Yes Yes No
Where d =depth of solution with in search tree b = branching factor of search tree n =subset of b for which algorithm will actually process.
Table 1 Comparison of different search algorithms
In the table 1, the attributes create a basis for decision making. Each of the algorithms examined in the paper contains weak and strong attributes. It is the function of the problem space to weight the trade-offs between the algorithm and determine which algorithms provides the best solution
- 29
[3].It can be seen from the table that the time estimate from all the searches are similar. The three exceptions are the Bidirectional, Beam and Generate and test series. The main reason that the Bidirectional search has a lesser time estimate is because it is simultaneously working from both ends of the problem looking for a common intermediate node. The beam search has a time estimate of O(nd) as opposed to the more common O(bd). It is because the Beam search is modified A* search that examines on the best n branches at any node. It speeds up processing, but at the cost of assuming that a suboptimal node will never need to be travelled to reach the goal state. If that is the case the solution to the search will never be found. The memory requirement of the search algorithms are more distributed than the time estimates. In many cases a search algorithm will approach a problem breadth first or depth first.
- 30
subtask or the interactions among them prevents the plan from being feasible the planning system will backtrack and try other methods. Travel(x, y)
Travel by air
Alternative methods
Travel by taxi
Get texi Ride texi(x,y) Pay driver Restriction use only for short distance
Travel(UMD,MIT) Buy ticket (BWI,Logan) Travel(UMD,BWI) Get taxi Ride taxi(UMD,BWI) Pay driver Fly(BWI,Logan) Travel(Logan,MIT) Get taxi
Figure 11methods for travelling from one location to another and how they might be the task of travelling from the Maryland to MIT.
Fig 11 shows two methods for the task of travelling from one location to another: which are travelling by air and travelling by taxi. Travelling by air involves different subtasks which are purchasing a plane ticket, travelling to the local airport, flying to an airport close to our - 31
destination and travelling from there to our destination. Travelling by taxi involves the subtasks of calling a taxi, riding it in to the final destination and paying the driver. Each method has restrictions on when it can be used i.e., air travel is used only for long distances and travel by taxi is only applicable for short distances. Now we will consider the task of travelling from the University of Maryland to MIT. Since this is along distance so we cant apply the travel by taxi so we will choose the travel by air method .As it is shown in figure it decomposes the task in the following subtasks purchase a ticket from Baltimore Washington International airport to Logan airport, travel from the university of Maryland to BWI, fly from BWI to Logan and then travel from Logan to MIT. For the subtask of travelling from the University of Maryland to BWI and travelling from Logan to MIT we can use the travel by Taxi method to produce additional subtasks as show in fig. Solving a planning problem using HTN is not as easy as it is shown in this simple problem. It is more complicated. We will discuss some complications which arise generally during solving the travel planning problem. The planner may need to recognize and resolve interactions among the subtasks i.e., in planning how to get to the airport one needs to make sure one will arrive at time to the airport to catch the plane. In the above example it is always clear that which method will be used but in general more than one method may be applicable to a task. If it is not possible to solve the subtasks produced by one method, it may be necessary to backtrack and try another method rather than that [15].
- 32
Evaluate trade offs and select among alternative courses of action Let the user search and override system suggestions.
For providing flexible and easy interaction the system must Lat the user input data and change his choices any time during planning and Handle information source that returns result black to user asynchronously.
So now we are going to describe an AI based travel planner named Heracles which is generally information gathering and monitoring tool and its working for simplifying these possible complicated events. Heracles divides the network hierarchically corresponding to the task structure of the application domain in the same manner which is similar to hierarchical task network planning. The application designer groups variable and constraints related to the distinct task into a package which is called a template [16]
Trip And
1
Mode to destination OR
2
Lodging OR
Drive
Fly
Taxi
RentCar
Hotel
No Overnight
ModeToAirport Flight detail Mode from airport OR Drive Taxi Rent Car OR Taxi
The above figure shows the hierarchical organization templates for the travel planner .This is the top level template of the Heracles travel planner which includes the most important information about the trip such as the origin place, destination and dates of travel. The next layer of decision - 33
includes the alternative means of transportation such as flying, taking the train, renting the car, driving the users own car or taking a taxi to destination. Secondly choice of accommodation on reaching at destination. Below figure a shows that system suggests flying the variable and constraints constitute another template in figure b Heracles further decomposes each template into more specific sub templates. For example one user has chosen fly as the main transportation mode, the system must evaluate then how to get to the airport i.e., if it is by taxi, by driving a car and parking it to the airport.
(a)
- 34
(b)
Figure 13 Travel planner template (a) a top level and (b) fly template [16]
1- Flight status monitoring agent These agents use the ITN flight tracker sight to get the current status of a given flight. If the flight is on time the agent sends the use a message to that effect two hours before departure. If the user flight is delayed or cancelled and sends the message to the user preferred device i.e. cellular
- 35
phone of pager. If the flight is delayed more than one hour the agent sends a fax to the car rental counter to confirm the users reservation
2- The Air fare monitoring agent The air fare monitoring agents keep track of current prices for the users itinerary. The airlines change price unpredictably, but the traveller can claim for refund if the price drop below the purchase price. Mostly agent gets air fares from Orbitz (www.orbitz.com) 3- The flight schedule monitoring agent The flight schedule monitoring agent keeps record of the changes to the schedule departure time of a flight and notifies the user if there is any change. Without this type of agent traveller mostly knows this type of schedule after reaching at the airport. 4- The earlier flight monitoring agent The earlier flight monitoring agent also used Orbitz to find that flight which leave earlier than the scheduled flight. It shows the alternative earlier flights and their status. This information becomes very important when the scheduled flight is significantly delayed or cancelled. 5- The flight connection agent These agents track the users current flight and a few minute before its landing, it sends the user gate and status of the connecting flight. 6- The restaurant finder agent The restaurant finder agent allocates the restaurant for the user either by global positioning system (GPS) or by his own location according to the plan. If requested it provides 5 closest restaurants providing cuisine type, price, address, phone number, longitude, latitude and distance from users location.
- 36
Figure 14 user interaction and constraint propagation for the travel planner[16]
- 37
Departure Date
March15,01
Distance
get ParkingRate
$230.00 TaxiFare $16/day ParkingRate
Multiply
ParkingTool $64
selectModToAirport
Taxi
ModeToAirport
- 38
Fig 15 defines the fragment of the constraint network of the travel assistant that addresses the selection of the method of travel from users original location to the airport. There are tow choices under consideration which are 1-Driving ones car which implies leaving it parked at the parking of the airport for the duration of the trip. 2- Taking a taxi In the sample network figure the variables are shown with white rectangles and the assigned values as orange rectangles next to them. The variable keep the relevant information for this task in the application domain such as Duration of the trip, DepartureDate, the ParkingTool, the TaxiFare and the ModeToAirport .The Departure Airport has been assigned value of LAX which is assigned by the system since it is the closest airport to the users address. A constraint is a n-array which relates a set of n variables by defining values of those variables .In Heracles the constrains are directed [16].The system evaluates constraint only after it has assigned values to a subset of its variables and the input variables. The constraint evaluation process produces the set of possible values for the output variables. In the Fig 15 the constraint are shown as rounded green rectangles. In this example the ComputeDuration constraint involves three variables (DepartureDate, RetunDate and Duration) and it is implemented by function that computes the duration of a trip in the given departure and return dates. The constraint getParkingRate is implemented by calling an information agent that accesses the website that contains parking rate for airports in the country. Each variable can also be related to preference constraint .This constraint is often implemented as function that imposes an ordering of the values of the domain. Preference for business travel is to choose a hotel closest to the meeting is such kind of example.
- 40
status information. The resulting normalized flight status information shows that the flight is arrived, cancelled or departed. If the flight is delayed or cancelled the user is notified via Email operator.
Fax
Hotel
7.4 Programming of Search Algorithms Four different kind of programmes have been made in which the AI search algorithms have been implemented the explanation of them is described below. 1- In first programme the name of an input file from the command line is accepted. The programme reads the string from the input file into dynamically allocated array of pointers to characters. It prompts the user for a string to search for. After this it searches the array using binary search. If the array is found it reports the row and explain in which target is found. If the target is not found it asks for try it again. - 41
2- The second programme is about binary tree search, in which binary tree search algorithm is used. In the list of alphabetically strings. This search is made with in the limit of first item and to last item using a binary tree search method. We have to determine a pointer to the string and it is found in the pointer string. The first item I the subindex limit of PtrList array of pointers and similarly LastItem which is the high subindexlimit of PtrList array of pointers. The function supposes that pointers in PtrList point to alphabetically ordered strings. The first and lastitem allow the users to find it in the subset of PtrList array of pointers searching by binary tree. If found it returns the index values when not found returns 0 and ask for try again. 3- In the third programme AI search algorithm is utilized. Search is base class which implements the unidirectional search. From this class we can derive other classes which implement the actual search algorithms such as depth first search and breadth first search are easily derived. The behaviour of the search i.e. the type of the search algorithm depends upon the implementation of the virtual function add(). The class search processes objects of class node and classes derived from node( DepthNode, Uninode and BestNode). On the other hand Application level classes that are derived from one the derivatives of the search class must implement the following function. is goal () : determines if the node is goal node 1: yes 0:No . The pseudo code is written below #include <stdio.h> #include<ainodes.h> class Search public: Search (int numop , Node *start , Node *goal) ; Virtual ~search (); Virtual int is goal( const Node *); Int generate (); Void display () const ; IntrList <Node> *get_sol(); Node *get_goal() const ; Void set_startnode(Node *); Void set_goalnode(Node *);
- 42
Void clear (); Private : Node *solve (); Virtual int add (Node *) =0 Void print _sol(Node *) const ; Int num_op; Node *goalnode, *solgoal; Protected SortedIntrList<Node> open , closed; }; #endif;
- 43
3- Facilitating Process Improvement Successful templates can be learned and reused not only for problem solving but also for other purposes for example learning better strategies, training and selecting appropriate activities in real solutions.
Planning/Constraint Satisfaction Programming Heracles, Heracles2 SmartClient Trip-Planner Expedia and other Travel web sites.
| User | interaction
| Information | Gathering
- 44
The system must be cooperative, heterogeneous and distributed. It must enable full autonomy of the respective participants Should support the entire consumer life cycle. Allow dynamic network configurations Provide intelligence for customers and suppliers as well as in the network It must focus on mobile communication enabling multi channel distribution.
- 45
Most designers in this field have been too realistic and implemented mostly agent based constraint travel planners. In the future web Heracles will have bright image and will be used most of the travel planners. The tourism domain is an excellent example of the trend towards personalized service and complex market mechanism. It reflects user becoming a part of product creation. Researchers must also study non technical issues related to markets and users such as Dynamic market and network structures. Pricing and market design. Design and experimenting business models User decision modelling and usage analysis.
E-tourism market is dynamic and there are lot of opportunities in the research in this field. Future systems mainly emphasize e-tourism importance. A lot of work is being done in constraint satisfaction programming for tourism and travel planning.
9 Discussion
The AI search algorithms are common algorithms in AI for finding better routes and also for navigating routes. All AI search algorithms are important but some of them are used quite often due to which they are more usable and mostly implemented than others. The base of all algorithms is A* algorithm which is used for shortest path and fast algorithm for finding better routes. As all the algorithms and their properties are mentioned in the table 1. As far as implementation is concerned I have chosen bidirectional search, breadth and depth first search algorithms. Breath first search is mostly used in AI search techniques to find shortest path and it is not very time consuming. As we measure functionality of all algorithms In terms of four factors which are completeness, optimality, time complexity and space complexity. In the breadth - 46
first search it is complete and is guaranteed to give the solution of the problem and, secondly it also provides the optimal solution. Memory wise it also keeps more record and also better than other algorithms and performs function faster. When we compare this algorithm in aspect of time, it takes O(bd) which means it does not take much time to give solution of problem. Depth first search is not optimal or complete but memory and space wise is better. Basically these algorithms are checked for finding better or fast solution, if these algorithms are failed to provide the exact solution of problem then other algorithms are tested. One reason is also shortage of time and it requires more research.
- 47
11 References
[1] Lecture Notes by RobSaunders from City University London on Introduction to Artificial Intelligence for games .November 2004. http://www.soi.city.ac.uk/~rob/Lecture09-8up.pdf Last referred on February 2006. [2] Article on Applying Artificial Intelligence Search Algorithms and Neural Networks for Games by Stuart James Kelly who is professional programmer in UK wrote on 13-1-03 http://www.generation5.org/content/2003/KellyMiniPaper.asp,Last referred on March 06. [3]Hemant M. Joshi, Joshua A. Mcadams, Search Algorithms in Intelligent Agents, Scientific Paper on various search algorithms. Last referred on March 2006. [4]Artificial intelligence a Modern Approach a book by Stuart Russell and Peter Norvig A book on Artificial Intelligence and its algorithms. Last referred February 2006. [5] Scientific paper on Artificial Intelligence Search Algorithms on June 1999 By Richard E Korf who belongs to computer science department University of California Los Angeles. http://citeseer.ist.psu.edu/cachedpage/388096, Last referred May 2006. [6]Definations by Patrik Owen Doyle who is PhD from Stanford University wrote definations On AI search algorithms and techniques.http://www.cs.dartmouth.edu/7Ebrd/Teaching/AI/ Lectures/summaries/search.html#definitions ,Last referred on May 2006. [7]Brian T Luke, Evolutionary Programming Applied to the development of Quantative Structure property relationships. http://members.aol.com/btluke/featur03.htm. Last referred on April 2006. [8] An article on Phylogenetic trees by Peer Itsik on 1-1-2001. http://www.cs.tau.ac.il/~rshamir/algmb/00/scribe00/html/lec08/node10.html, Last referred On April 2006. [9] Lecture notes on AI and search algorithms from the Masey University Institute of Information and mathematic science. cs-alb-pc3.massey.ac.nz/ notes/59302/l03.html, Last referred on May 2006. [10]A tutorial on Tabu search by Alain Hertz, Eric Taillard, and Dominique de Werra. http://www.cs.colostate.edu/~whitley/CS640/hertz92tutorial.pdf,Last referred March 2005. [11] Tony Abou-Assaleh computer science student Brooke University Canada, Article on Intelligent Search Algorithm in 1999.http://www.cosc.brocku.ca/~cspress/Helloworld/ 1999/02-feb/search_algorithms.html, Last referred May 2006. [12] John Betali Associate professor Department of cognitive science university of California Sandiago, lecture notes on cognitive science and search algorithms. Nov 16, 1999.
- 48
http://cogsci.ucsd.edu/%7Ebatali/108b/lectures/heuristic.html,Last referred March 2006. [13] Dr Qiefeng Zeng, Dr Kyriacos C Mouskos, Heuristic search strategies to solve Transportation network design, Final Report to the New Jersy Department of Transportaton and the national center for Transportation and Industry productivity in December 1997. [14] Graham Kendall, Reader in Computer Science - School of Computer Science and Information technology, the University of Nottingham G5AIAI, notes on Introduction To Artificial Intelligence .http://www.cs.nott.ac.uk/~gxk/courses/g5aiai/003blindsear ches.htm on Sep 2001, Last referred May 2006. [15]Stephen J.J Smith, Dana Nau, Tom Throp. Computer Bridge:A big win for AI planning AI magazine, 19(2):93-105, June 1998. http://www.cs.umd.edu/~nau/papers/bridge-ai mag98.pdf, Last referred April 2006. [16]Jose Luis Ambite, Craig A. Knoblock and Maria Muslea, University of Southern California, Information science Institute, Steven Minton Fetch Technologies. http://www.isi.edu/integration/papers/ambite05-is.pdf, Last referred May 2006. [17]Introduction to Stochastic Search and Optimization (Estimation, Simulation and Control) By James C. Spall, ISBN 0-471-33052-3, 2003 by Wiley-Interscience series. Last referred February 2006. [18]Algorithms By Robert Sedgewick 2d ed.650p.24cm ISBN 0-201-06673-4, Addison Wesley Publishing Company, Last referred February 2006. [19]Artificial Intelligence( Structures and Strategies for Complex Problem Solving ) by George F Luger 4th edition ISBN 0-201-64866-0, Addison Wesly Publishing Company, Last referred March 2006. [20] Neural Networks(Algorithms ,Applications and Programming Techniques)By James A A Freeman/David M. Skapura ISBN 0-201-51376-5, Addison Wesley Publishing Company Last referred February 2006. [21]The University of New South Wales Australia, The Aq Induction Algorithm, By Claude Sammut Professor of Computer sciences at UNSW Australia, http://www.cse.unsw.edu.au/~ Teaching/AI/notes/ml/06prop/aq/aq.html. Last accessed 24 May 2006. [22] The Artificial Intelligence company website of Japan, Introduction to different search Algorithms,http://ray.sakura.ne.jp/search_problem/depth_breadth.html,last accessed June 2006.
- 49