The Physical Travelling Salesman Challenge
mikejuk writes "You probably know that the traveling salesman problem is one of the classics of computer science theory. Now we have a new challenge — the Physical Travelling Salesman Problem and anyone can join in. All you have to do is visit each city once using an optimal route. The new element is that you now have to drive between the cities using a 'car' that has inertia and friction — see the video. You can submit an AI bot to solve the problem or drive the course yourself."
Sounds like a relative of the ICFP 2008 contest: http://www.cs.uchicago.edu/newsletter/353
I thought the point of the actual mathematical problem was to mathematically conclude the best possible path, with the understanding that it wouldn't be real-world achievable but that one would use that as a guideline to strive for.
This little game they came up with removes the math portion of the experiment entirely, and while it adds the acceleration changes due to mass, one could have just introduced those acceleration changes into the original problem mathematically.
I don't understand what the little game is actually for. It's not entertaining enough despite their attempts to compare it to Crazy Taxi and others, and without there being math involved in plotting the route I don't see how one practices the theory beyond a child's level.
Do not look into laser with remaining eye.
The traveling salesman problem is based on a table of distances between the city pairs. It doesn't matter to the problem HOW those distances are calculated, or even if they include other variables. So this can be trivially reduced to the classic version of the problem.
Hi, I'm the organiser of the competition. The PTSP is meant to be a benchmark where different AI techniques can be tried and tested. This game gathers many of the features that real-time video games have (pathfinding, navigation, obstacle avoidance...). The objective is to provide a benchmark where new AI techniques can be tested and potentially exported to real time games. Of course the objective is not to solve the TSP. Actually, it's been seen that optimal TSP solutions, if we just consider the distances between the waypoints, do not create optimal PTSP paths. This makes the problem harder than just applying one of the very well known techniques to solve the TSP. Currently we have a couple of submissions that are behaving quite well, but there could be still room for improvement! Cheers, Diego.
Or are the additional factors introducing changes, which make it easier to get the optimal solution (i.e because the optimal solution isn't always the shortest)?
Just go to Amazon.com instead. Problem solved!
"I bless every day that I continue to live, for every day is pure profit."
It might get easier.
Last I knew the "pure" problem was "Hard" because it counted minor variants that were off by a mile as "invalid answers". Whereas the "Approximations" came out really fast because in the real world you didn't care about an extra time.
Same thing here, while the classic problem bitches about the extra mile or not, in the real world, if you have one road with crushing traffic, many other solutions become better even if they are 5 miles longer. That's fairly true in my area.
My first Journal Entry ever, in 8 years! http://slashdot.org/journal/365947/aphelion-scifi-fantasy-horror-poetry-webzine
Last I knew the "pure" problem was "Hard" because it counted minor variants that were off by a mile as "invalid answers". Whereas the "Approximations" came out really fast because in the real world you didn't care about an extra time.
I recommend a variant: "Real time travelling salesman": You have a set of points, a starting point, and the times to travel between the points in second. You start a computer program which outputs the points to visit in the order they are visited. Here's what makes it "real time": You can start travelling to the each point only when the computer has output that point. The computer program can continue working on the next point while driving.
Can someone wake me up from this Chris Nolan dreamworld in Inception, "Physical" traveling salesman problem ? Did someone forget to add weights to edges in math class?
No Greater Friend, No Greater Enemy! (Lucius Cornelius Sulla)
First, the "PTSP" (somewhat misleadingly named, since it uses video game physicsrather than realistic physics) appears to rely on a planar Euclidean map, so it might best be compared to the Euclidean Travelling Salemsan Problem (http://en.wikipedia.org/wiki/Travelling_salesman_problem#Euclidean_TSP), which is NP-complete but susceptible to polynomial time approximations (and pretty good ones in practice, I think).
The right sort of graph for a TSP corresponding to a given PTSP map is probably based on a Hilbert space with 5 or 6 dimensions: the 2 planar dimensions of the PTSP map, the 2 dimensions of the velocity vector, and 1 or 2 dimensions to represent the orientation (there's 1 degree of freedom, but it might be better to use the sin-cos vector).
The precise status of "PTSP" probably depends on the exact treatment of the real number calculations. As noted by dperez above, solving the obviously corresponding TSP (Euclidean distances on the same planar map) doesn't yield the optimum solution for the PTST. But you'd get a pretty bad grade in your algorithms/complexity class if you did it that obviously wrong way. An interesting algorithms question is whether there is another graph, derivable from the PTSP map, whose TSP solution yields an optimal play for the PTSP.
If we assume exact real number calculations, and the ability to use any real number value for a rotational angle, then I am pretty sure that each PTSP yields a TSP based on a Hilbert space and the solution to the TSP gives an optimal play for the PTSP. The basic idea is to precompute several paths for each pair of nodes, each one optimal for video game physics given a certain starting velocity. Each node of the original PTSP map corresponds to a set of nodes for the corresponding TSP, each with a different starting velocity. To knit things perfectly, there are some additional nodes with low-cost connections so that a visit to any one of the copies of the PTSP node allows a cheap visit to all of the copies. Notice that this derived TSP is not Euclidean, but the underlying Euclidean space probably leads to some good approximations.
There are lots of details to work out there, and they might be difficult. The precomputation might be easy or hard to approximate, depending on exactly what sort of optimization it amounts to. If it can be done with some sort of least squares problem, then it can probably be approximated well enough to win.
What if we assume exact real number calculations, and ask for an algorithm that uses them? This changes the computing model underlying NP-completeness, but it's probably been done somewhere. (Can anyone find a citation? I didn't see anything relevant in the Wikipedia article on TSP.) In that case, the difficulty probably hinges on the finite solvability of the "precomputation" mentioned above, and it might be anything from quick (e.g. least squares) to infinite (requiring iterative approximation).
If we take the floating point approximations in the video game physics seriously, then the PTSP almost certainly corresponds to a TSP on a larger graph. The larger graph might have to be as large as the full grid of Hilbert-space points with floating point co-ordinates, but I'm betting that it can be cut down a lot in most or all cases. This derived TSP probably has good approximations due to the underlying grid, but it doesn't appear to satisfy the well-known metric approaches, such as Manhattan metric, exactly. It appears to be polynomially related to the PTSP map, but possibly with a practically huge increase in size.
In any case, dperez's claim:
This makes the problem harder than just applying one of the very well known techniques to solve the TSP.
("This" being the fact that the TSP solution on the same graph is not optimal for PTSP) is nonsense. The PTSP as given could be easier, harder, or equivalent to TSP. Being charitable, dperez probably just means that it isn't obvious how to win the PTSP challenge using a known TSP approximation. Sure. But w
Mike O'Donnell http://people.cs.uchicago.edu/~odonnell/
TSP is NP-Complete, which means that it is NP-Hard and it is in NP. The definitions are a bit confusing in casual use.
Mike O'Donnell http://people.cs.uchicago.edu/~odonnell/
We've spoken at cross purposes a bit. There are two things commonly referred to as TSP:
Both of these are NP-Hard. The definition of NP-Complete refers only to yes/no problems, so it can't be applied to number 1. But people commonly say that TSP version 1 is NP-Complete since version 2 is NP-Complete, and a solution to version 2, used as a subroutine, gives a polynomial solution to version 1.
Using the naming conventions of the Wikipedia article (http://en.wikipedia.org/wiki/Np-hard#NP-naming_convention), TSP version 1 is NP-Hard and NP-Easy, therefore NP-Equivalent. NP-Equivalent yes/no problems are called "NP-Complete." Even the most specialized of specialists in Complexity Theory find it hard not to say "NP-Complete" when they mean "NP-Equivalent."
Mike O'Donnell http://people.cs.uchicago.edu/~odonnell/
My AI found traveling places to sell people things to be illogical, so I had to revise its instructions. The new ones read "You are to travel to each city to kill all humans. In order to most efficiently kill all humans, you must visit each city only once. What is your route?"
Note to cities: If an AI arrives to kill all humans, you can avoid it by leaving the city briefly and then returning once it's left. It's so cute, that way...
I'm trying to teach myself to set people on fire with my mind... Is it hot in here?
where the objective is to direct the agent to visit all waypoints scattered around a map as quickly as possible.
http://en.wikipedia.org/wiki/Cannonball_Baker_Sea-To-Shining-Sea_Memorial_Trophy_Dash
Have gnu, will travel.
The traveling salesman problem is based on a table of distances between the city pairs.
More technically the 'distances' in the table are a set of pre-set weights on each link in the graph, the TSP algrothim finds the path that has the lowest sum of weights from the finite number of possible paths between nodes. At first glance, it may appear that you can simply swap 'time' for 'distance' but the curvy line in the video I haven't played yet is a big clue as to why that won't work here.
It doesn't matter to the problem HOW those distances are calculated, or even if they include other variables.
True, but it does matter WHEN you calculate them, in the classic TSP the weights are predefined constants for all possible paths, here the weights vary depending on the path.
So this can be trivially reduced to the classic version of the problem
No, the TSP does not cater for variable link weights or infinite paths, this problem has both and is a type of Trajectory_optimization problem. Of course you could shoot me down in flames by posting an extention to the TSP that solves what I would call a constrained version of the n-body problem, but my money is on a hill climbing algorithim to win this competition, meaning 'brute force' is the favorite for the win, and 'lucky hit on a tall hill' for a place in the top 3. ;)
And did you exchange a walk on part in the war for a lead role in a cage? - Pink Floyd.
...I want a car that doesn't have friction or inertia. 0 to 60 in 0.0 seconds!
Just because you sold your soul to the devil that needn't make you a teetotaler. --The Devil and Daniel Webster
You're misunderstanding the TSP - in the standard problem, the distances are known in advance, but there are n-factorial possible routes, so if n's large, you can't just enumerate all of them to find the best one, which makes it hard to tell if the best route you've found so far is actually the best. In the mathematical version, you can quickly verify whether any particular route is valid (hits all the cities, using valid roads between them), so in the real world you could drive that. (The only way you wouldn't have a real-world-achievable solution is if it takes longer to calculate the optimal route than it does to drive a pretty-good route.) The reason for using heuristic algorithms is to find pretty good routes with a reasonable amount of computation, and when I last studied it back in the late 70s, there were heuristics that had provable upper bounds of "no more than 50% longer than the optimal route" - somebody's probably found better than that by now.
There are dynamic variations on the problem where you don't know all the destinations or costs in advance, so e.g. the salesman starts out on Monday with three cities to visit, and on Tuesday he gets an order for City 4, and on Wednesday he gets orders from City 5 and City 6, etc.
The article doesn't do a good job of explaining the game, probably because the author or game designer doesn't really understand the mathematical problem? From a mathematical standpoint, if you're trying to get from City 1 to City 2, it's going to cost X12, and unless the game is changing something about the physics, you can calculate X12 in advance. Maybe it's intended to let the kids who are intuitively good at driving games have some chance against the kids who are intuitively good at finding pretty good routes?
Bill Stewart
New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
No. The reason the pure problem is hard is that there are N-factorial possible solutions, which becomes infeasible to compute if N is large, and there aren't any good algorithms known to find the optimal solution that are better than enumerating them all. The reason for approximation algorithms is to get a pretty good answer in a reasonable amount of computation time, and there are algorithms that can provably get you within X% of the best solution (50% back in the late 70s), but they don't tell you anything about what the best solution is, they just set lower bounds on it.
The pure problem uses a cost function, and which can be road distance or time or whatever makes sense for your application, so if your cost function is time, then the road with bad traffic/low speed limit/etc. is more expensive than a road that's more miles but less crowded / higher speed limit /etc.)
Bill Stewart
New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
Why do you say that the optimal TSP solutions don't create optimal PTSP paths? If you're just saying that "we're using time as a cost function, and for physics reasons it's not a simple multiple of distance", that's fine, you still know all the physics in advance so you can calculate your cost functions in advance, and use them to solve the TSP. Also, the article doesn't say how large N is, so it's hard to tell from reading it whether there are too many destinations to use an exact TSP algorithm and you need to use a heuristic instead.
Bill Stewart
New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
why do i have to SIGN UP for everything? So annoying.
Can we have a standard that there ALWAYS exist a username / password:
username: johndoe
password: johndoe
That way, I can try out these services without wasting my time to sign up.
Few days ago I was trying to download some demo of an application and it required me to sign up. So, I typed in "johndoe" for the username and was notified that that user already exists. I then (randomly) tried to login as johndoe / johndoe and it worked! I was able to download the demo without having to sign up.
I plea the internet community to create johndoes!
What's next, the Relativistic Travelling Salesman problem? How about that for a challenge!
The three laws of thermodynamics:(1) You can't win. (2) You can't break even. (3) You can't even quit.
I always thought they figured into the travelling salesman problem.
In fact, I thought the were the point.
wtf?
why everything needs an email and a user and a password.
Fuck off, im not interested in pests.
btw, thank you slash dot for not requiring user name and password.
There may be n! "paths" but if it's just points in 3D space with distances between each pair (and no "one-way-streets"), you can shrink it to (n-1)! if you only care about the visiting all the points and returning to the start, (i.e. ABCDA would have the same path length as BCDAB etc) not the starting point, and further shrink it to (n-1)!/2 if you don't care which direction you travel (ABCDA would have the same path length as ADCBA).
With small n (such as 10) searching ~180K paths compared to approx ~3.6M is great. But yes, when you get huge n it doesn't make that much difference.
involve a farmer's daughter?
Why is this problem labeled as any kind of "Traveling Salesman" problem? Why would a salesman ever pass through a city without stoping? I thought that the point was for the salesman to stop at each city and sell products, not pass through with the highest speed possible.
"MIT hackers have turned the Green Building, the tallest building in Cambridge, into a giant, playable, full color game of Tetris. According to the IHTFP Hack Gallery, "MIT hackers have long considered 'Tetris on the Green Building' to be the Holy Grail of hacks. http://pickpostpack.com
[url=http://pickpostpack.com/]àààààà±ààà±à(TM)àà