18
Final Version Olex Ponomarenko

Final Version Olex Ponomarenko. Goals for the Project Create a fairly abstract map path-finding program Add more complex heuristics to account for things

Embed Size (px)

Citation preview

Page 1: Final Version Olex Ponomarenko. Goals for the Project Create a fairly abstract map path-finding program Add more complex heuristics to account for things

Final Version

Olex Ponomarenko

Page 2: Final Version Olex Ponomarenko. Goals for the Project Create a fairly abstract map path-finding program Add more complex heuristics to account for things

Goals for the Project

• Create a fairly abstract map path-finding program

• Add more complex heuristics to account for things such as traffic lights, stop signs, and different amounts of roads

• Create a random graph generator

• Create a visual representation, perhaps using Java, to display the map

Page 3: Final Version Olex Ponomarenko. Goals for the Project Create a fairly abstract map path-finding program Add more complex heuristics to account for things

Goals (but in one sentence)

• Basically the idea is to create a method of searching for a path on an abstract map that would lead to simpler, more realistic results, and avoid passing through generally slow turns and intersections. (stop sign left turns onto a big street like Fairfax County Parkway, etc, are less likely to be used)

Page 4: Final Version Olex Ponomarenko. Goals for the Project Create a fairly abstract map path-finding program Add more complex heuristics to account for things

Specifics

• The language used will be Python for the speed and ease of coding that it provides

• Java will be used to create the visual, as Java graphics are easy to work with.

• The maps and searches will be realistic, and the program overall will be as efficient as it can be, allowing large-scale data sets

Page 5: Final Version Olex Ponomarenko. Goals for the Project Create a fairly abstract map path-finding program Add more complex heuristics to account for things

DEVELOPMENT

Page 6: Final Version Olex Ponomarenko. Goals for the Project Create a fairly abstract map path-finding program Add more complex heuristics to account for things

First Quarter

• A very basic version of the program was developed

• Built upon the path finding program in the AI course

• Text-only, basic coordinates, only one type of roads, and most importantly, no intersections.

Page 7: Final Version Olex Ponomarenko. Goals for the Project Create a fairly abstract map path-finding program Add more complex heuristics to account for things

First-Second Quarter

To give you an idea of what the program did (since input / output are all just text)

Only one type of road (no difference whether it’s a small driveway or I-95) represented

One type of location

No guarantee of mutually-connected locations

Doesn’t account for delay or turns at intersections

Page 8: Final Version Olex Ponomarenko. Goals for the Project Create a fairly abstract map path-finding program Add more complex heuristics to account for things

Different road sizes

No overlapping locations (none within 10 units of space between each other), all locations connected.

BUT – Still no intersections

Mostly random roads (note the only path to get to the purple one and the random 5-foot long interstate highway)

Second Quarter

• The RGG at this point was somewhat random – the following being a good example of the type of map it produces:

Page 9: Final Version Olex Ponomarenko. Goals for the Project Create a fairly abstract map path-finding program Add more complex heuristics to account for things

Current Generator

• This is what the final version does:

Realistic road structure – coherent highways, not as spastic in terms of road placement

Intersections – A is a bridge with no exits, drivers on the small road (black) cannot get onto the interstate highway (red) ; at point B, drivers on the green (sort-of like Braddock) pass freely, but drivers on the small road have to go through a stop sign – meaning different wait times based on which road you’re moving on, and what turn you’re taking (left = slower, etc)

Page 10: Final Version Olex Ponomarenko. Goals for the Project Create a fairly abstract map path-finding program Add more complex heuristics to account for things

Other Features

• Scalability – highest order function is O(n2) (finding the intersections between roads) – the program can generate maps up to 800x800 maps with 700+ locations within a minute.

200 x 200 map, 199 locs, 8 seconds to generate

Page 11: Final Version Olex Ponomarenko. Goals for the Project Create a fairly abstract map path-finding program Add more complex heuristics to account for things

750 x 750 map , 694 locs, 38 seconds to generate

Page 12: Final Version Olex Ponomarenko. Goals for the Project Create a fairly abstract map path-finding program Add more complex heuristics to account for things

Other Features (cont.)

• Dynamic Point Costs – aka. Realistic intersections. Simplification:

Fast Highway

Medium Road

Both roads travel fast through the intersection, as it is a system of exits. No delay.

Equal roads have an equal delay to pass (traffic light)Right turns 2x faster, Left turns 3x slower.

If all-way stop sign (right), all turns are equal delay.

Stop sign for the smaller road, no delay for the larger road

Small Road

Page 13: Final Version Olex Ponomarenko. Goals for the Project Create a fairly abstract map path-finding program Add more complex heuristics to account for things

Other Features (cont.)• Color-Coding – Different-sized roads have

different colors. White -> Black on prior pictures, here’s a rainbow one.

Page 14: Final Version Olex Ponomarenko. Goals for the Project Create a fairly abstract map path-finding program Add more complex heuristics to account for things

Results

• The “control” was a more basic version of my program, as such:– Intersections considered instantaneous– Cost to go from location to location = distance

times speed limit of the road.– Basic A* heuristic

Page 15: Final Version Olex Ponomarenko. Goals for the Project Create a fairly abstract map path-finding program Add more complex heuristics to account for things

Results (cont.)

• I ran 100 tests with the same random map (different each time) to go from a random place to a random other place.

Each pixel ~ 125 feet

1 mile = 42 pixels

Distance Between Points (in Pixels)

% of searches improved

<50 1%

51-120 12%

121-200 8%

201-300 8%

301+ 5%

Page 16: Final Version Olex Ponomarenko. Goals for the Project Create a fairly abstract map path-finding program Add more complex heuristics to account for things

Conclusion

• With all the added complexity (>50% slower searching and calculation), it is no wonder that commercial map searching programs don’t use point costs.

• The improvement (up to 10% faster paths in very rare, short-distance cases) is not very useful, since at short distances the difference in travel times is usually less than a single minute

Page 17: Final Version Olex Ponomarenko. Goals for the Project Create a fairly abstract map path-finding program Add more complex heuristics to account for things

The Big Picture

• My project is very expandable. Probably the best next step would be to add a learning heuristic, which will alter the heuristic based on results, in order to find the shortest path in the quickest way possible and make the search more efficient. This could improve the results to the point of usefulness; however, I believe that is unlikely.

Page 18: Final Version Olex Ponomarenko. Goals for the Project Create a fairly abstract map path-finding program Add more complex heuristics to account for things