A Day In a City

27
Academic Advisor: Prof. Ronen Brafman Team Members: Ran Isenberg Mirit Markovich Noa Aharon Alon Furman A Day In a City

description

A Day In a City. Academic Advisor: Prof. Ronen Brafman Team Members: Ran Isenberg Mirit Markovich Noa Aharon Alon Furman. Introduction. When most people go on a vacation or a day trip, they usually plan a specific schedule. Planning a day trip isn't always an easy task. - PowerPoint PPT Presentation

Transcript of A Day In a City

Slide 1

Academic Advisor:Prof. Ronen Brafman

Team Members:Ran Isenberg Mirit Markovich Noa Aharon Alon Furman

A Day In a City

IntroductionWhen most people go on a vacation or a day trip, they usually plan a specific schedule.

Planning a day trip isn't always an easy task.

A Day in city project strives to make finding the best schedule and the best activities for each user's unique taste as easy as double clicking.

How many times have you tried to plan a day trip to your favorite city? How many times have you found it difficult to find the perfect schedule that fits your style and favorite activities?Usually, when you try to plan such a trip, you open a travel book (such as "lonely planet" series) and try to fit as many cool attractions as possible which results in a headache or confusion. Sometimes, the book isnt even updated and has mistakes. Sometimes you use websites, but then you have to interleave the needed information, which results in a lot of hassle and time consumption.This is where recommendation systems come in. As a rapidly developing area of Artificial intelligence, they can be used to solve automatically and easily the problem at hand.

2Current Situation

Lametayel.co.ilFriendsLonely PlanetOther SourcesNowadays, people use specific guide books (lonely planet), tourism websites (lametayel etc) and any other source.

3The ProblemThe average Joe needs to search, plan and integrate many information pieces from numerous sources.

It is not customized to the average Joes style or desires. The average Joe has to plan the schedule by himself.

It takes a lot of time and sometimes it can be very confusing (contradicting data) and not easy.

4Purposed SolutionA system that recommends itineraries of activities for a day trip in a city by using background knowledge & information about the user (Average Joe) it obtains during the session in order to suggest an itinerary. Purposed Solution How?Modeling the problem domain and user preferences by creating a corresponding Influence diagram.User preferences will be determined by answering questions, ranking activities and manual deletion of activities.Usage of optimization algorithms (one of them a greedy algorithm) in order to find the desired schedule.Communication with the user is done via a web interface.

System Architecture

System Architecture - Cont.GUI interface website Accessible from an internet webpage GUI controller It is the middle man between the projects' core and the user GUI and thus the user himself.Server Computational unit (SCU) Runs the various algorithms on the City Model according to the user preferences and input received from the GUI controller and sends the results back to it. City Model A predefined influence diagram with all the activities, probabilities, type of activities and user preferences. It is be based on the API of Genie & Smile.

GUI interface website Accessible from an internet webpage (an external interface to the user). Receives queries from user, dispatches them to the algorithms on the server, and displays questions to the user which he/she can answer and displays the final schedule of the day trip. It is the way the user interacts with the system.GUI controller Receives queries from the user, sends them to the computational unit and sends the results back to the user. It is the middle man between the projects' core and the user GUI and thus the user himself.Server Computational unit (SCU) The core of the project. Runs the various algorithms on the City Model according to the user preferences and input received from the GUI controller and sends the results back to it. City Model A predefined influence diagram with all the activities, probabilities, type of activities and user preferences that are used in order to find the optimal schedule and what questions to ask the user. This model basically reflects the desirability of different activities to the user. It will be based on the API of Genie & Smile, Structural Modeling, Inference, and Learning Engine.Database Holds information about the places that the user can visit: name, opening hours, a short description of the place, price per person, and the distance between places represented by the time to get from one place to the other. Also holds a reserve of questions that the program can ask the user. For every question their will be a list of possible answers and a list of places which the question relates to. Final Schedule The final result of the computational unit. It is consisted of the top valued activities that fit into a day and takes Into account the time needed to travel between them.

8Database Holds information about the places that the user can visit: name, opening hours, time to get from one place to the other etc. Also holds a set of questions that the program can ask the user.

Final Schedule The final result of the computational unit. It is consisted of the top valued activities that fit into a day and takes Into account the time needed to travel between them.

System Architecture - Cont.System Flow

City Model Example

Modeling: The model will have a chance (nature) node for each context information (such as age, religion etc.). These modes represent information about the user and thus also questions that will be presented to the user at the website. At the beginning all values have some default value. For each activity there will be 3 nodes: a chance node describing how much the user likes it on a scale of 1-5 (where each inner state: 1-5 will have a value of 0.2 probability), a decision node of whether or not the activity will take place and a value node. The value node will tell us how much we benefit from this activity. Some default values need to be inserted with some sense. For example, value node for going to the mall: in case the user wants to go to the mall we will get more than if he didnt want to. Also negative values are possible here (up to the designer).The value node will have as parents the decision node, the relevant chance node, and other decision nodes that are relevant to this activity (example: if you already go to a mall, a second one would be less desirable etc).

For each activity we will compute two things with the Smile engine: 1. The value of information of the chance node of this activity. This enables us to calculate the total value of a schedule by combining all the values of chosen activities. 2. How much he is expected to like it -- this is the expected value of the "like" node. Using these two items of information, we rank the activities on the top-right.

Ranking the questions - Here we compute the value of information of the different questions and use it to rank them and infer what questions are needed next.*Note that value of information is a function that we get from the Smile API.In case a user ranks an activity, removes it from a schedule or searches for it, we will update the model by changing the probability of the chance node that describes how much the user likes the activity. The way it changes it can be decided at a later stage.In case a user answers a question we will update the model by changing the probability of the nature node that describes that type of activity see appendix 5.4. Here is an example of a mini model consisted of two types of activities and 3 possible activities.

11Main Functional RequirementsClient User Interface

1. Answering a question.2. Evaluate an activity3. Changing the duration of an activity in the schedule.4. Removing an activity from the schedule.5. Open activity window 6. Search for an activity7. An Activity in the schedule details8. Close the search result windowUser Interface Example

Main Functional RequirementsInner Processing1. What question should we display the client ?

* The program will include an algorithm that will compute the best questions to ask.

* Best question - means that by answering this question, the program will receive the best information to calculate the best schedule. * The algorithm will use the value of information function from the smile API to achieve this knowledge.

Main Functional Requirements2. Which places should the program recommend to the client?

Which places the client would like?

Our algorithm will use the Smile engine to calculate for each activity the probability that user will like that activity. It will then sort them by that factor and display the top 5 activities so the user could rank them.

The places that are shown, will give the user the chance to see other events that are perhaps not included in the current schedule. Main Functional Requirements3. What happens when a user ranks an activity or answers a question?

The system updates the City model through the Smile API, thus adapting the model to the users unique taste!Main Functional Requirements4. How to decide which schedule to offer the client?

Greedy algorithm- try every combinations of events. For each combination check that the combination satisfies the time constraints. For each one that does , calculate its value. Return the schedule with the highest value that satisfies the constraints.

Schedule value adding the values of all utility nodes using Smile API on the City model.

This algorithm run time is an exponential time. One of our projects goals is to find a faster and better algorithm.

Non Functional RequirementsSpeed, Capacity & Throughput a. The server will support up to 20 simultaneous connections. b. The desired response time from the server containing the generated schedule is 2-3 seconds; however, a response within 20 seconds will be also acceptable.

Non Functional Requirements- ContModularity The database will be generic enough so new cities could be added in the future in an easy way.

Programming Language & External APIs The system will be implemented in the visual C# language in Visual Studio 2010 IDE. The system will use the Smile engine API.

Non Functional Requirements- ContSE Project constraintsFully operational demo of the system, demonstrating the functionality of the activities selection and schedule construction algorithms.Creation of the main schedule builder algorithm as a Greedy algorithm. However, the creation of a better and efficient algorithm (in addition to the greedy) will be considered and researched as the project progresses.

Use Cases

Use Cases- ActorsThe only actor in our system is a guest actor. A guest actor is any person who wants to use the websites functionalities and to create a trip schedule. That includes:Answering questions regarding his/her preferences.Changing the schedule (changing duration or removal of activities).Rank the value of an activity.Search for an activity.Open activity information window.Answer QuestionDescription: The guest can answer questions presented by the website in order to improve his/her schedule.Pre-conditions: the website finished loading and the server is up and running.Post-conditions: the question (or even all of them) will be replaced and the information (the answer) will be used to create a better fitting schedule

Change ScheduleDescription: The guest can change properties of the schedule suggested such as time or duration of an activity.Pre-conditions: the website finished loading and the server is up and running.Post-conditions: the schedule will be changed accordingly.

Evaluate ActivityDescription: The guest can rank the value of an activity in order to improve his/her schedule.Pre-conditions: the website finished loading, the activity is presented on the top right window and the server is up and running.Post-conditions: the information will be used to create a better fitting schedule.

Search for an ActivityDescription: The guest search for an activity of his/her choice.Pre-conditions: the website finished loading, the activity is at the specified city and in the database and the server is up and running.Post-conditions: the activity will be presented on the top activities panel (top right window).

Open Activity Information WindowDescription: The guest opens information window of an activity in order to learn more about it.Pre-conditions: the website finished loading, the activity is presented on the top right window and the server is up and running.Post-conditions: activity information window is open with the correct information about the activity.

Finish

Exit

Create all possible permutations of activities

Check for each generated permutation if the activities satisfy time constraints?

Yes

No

Read Data and initialize model

User Input (Answer to question, modify rankings, removing activity, changing duration of activity, search activity)

Create a clone of the city model containing only the activities in the current permutation and calculate the value of the schedule

Display the schedule with the highest value as the recommended schedule

User Input

Begin

After last iteration