Member since Apr 2018
15 posts

20190202, 22:08 #1
Subject: Assignment 4: Solution Heuristics
Regarding the presented heuristics in the solution. Won't both heuristics be fooled by an initially fruitful looking subtree? Asking in terms of optimality ... (see attatched image)

The author has attached one file to this post:

Member since Nov 2016
18 posts

20190203, 09:29 #2
+3 Jonas S, tyr, lu60ruhy
Yes. Initially. But the deeper the heuristic explores the promising path, the more it will cost. So it will start looking for cheaper paths than the ones it already traversed. E.g. at depth X+1 (at most) the heuristic will start searching the unexplored paths, because costs are the same as going deeper inside the already halfexplored ones. And finally it'll settle for the better path. Just try a test run with a small tree. When do you think will the heuristic stop exploring the right side in your example?
“Success is not final, failure is not fatal: it is the courage to continue that counts.” – Winston Churchill I copied that from a google search to look smarter. 
Member since Apr 2018
15 posts

20190203, 10:18 #3
Thank you for the answer  if I understand correctly, A* will start exploring the left side of my example tree as soon as it is through the cherries (level X+1). It will stop proceeding on the right side and focus solely on the left, as soon as the left side has turned up at least one cherry more than the right side has. Is my assessment accurate?
"You can't connect the dots looking forward; you can only connect them looking backwards."  Steve Jobs (but probably not in the context of tree traversals ... ) 
Member since Nov 2016
18 posts

20190203, 11:33 #4
+2 tyr, lu60ruhy
It depends on the exact heuristic, but if you think of cherrynodes as free travel and all noncherrys as costly, then the heuristic will (in your example) be done with the right side as soon as it realizes that there's even one cherry on the left. How about the most stupid heuristic: it just knows the cost up to that node.
Let's say the current cost we can afford is 0 (we are students after all). Then we'll be able to traverse the beginning of the right side pro bono. Cherrys are free after all. How far do we get on the left? Well... not even one node. Capitalism is in the way. But that's what friends are for, innit? So we borrow some cash from our best friend and see how far we can go with one money. On the right side... one node farther than we already could. Left? Just one node. That's not helpful. Now how about if we get a job as a TA in our favourite AICourse. Our budget increases slowly. Now we have X money. Aww yiss. Lets search further. Right: we get to depth X+X = 2X. Left: we get to depth X, as any single step down is oh so expensive. Assume that the left path has cherries starts at depth 2X. If we double our workhours at the job and do some tax evasion, we might get enough... Aah we're just one short. 2X1. Curse these delicious cookies they sell on the way to work. Or are we? So on the right we're reaching as far down as 3X1 (and we really searched every nook of that subtree down to that level). When we go one step further, our heuristic tells us we're over budget and should stop before being engulfed in crushing debt, leading to another financi... you get the point (the real reason is that we know there MIGHT BE a better way on the left subtree as the heuristic is a very positive thinker). On the left we're greeted with a different outcome. Upon reaching depth 2X1, for which we had to pay at every single downwards step, we have exhausted our whole budget. Now we go one step further, because we'll only stop when we go over budget and there's a chance that the next stop will be free. Can't get worse than the right subtrees cost at depth 3X, right? Now we go down a step. We didn't go over budget... let's try again. Same thing. And again... we reach the end without spending a single penny more than we did before reaching the first cherry. There are of course better heuristics, which are all just cheating in a way. The heuristic is just a guy telling you the most optimistic outcome as far as he can see. The one we used is just telling us what we already know, to be precise: We ask: "What's the best outcome if I continue with the path from this node onwards" Heuristic answers: "The cost it took to get here." If the path ahead only yields cherries, he's right. So we trust him. This is the most "optimistic" heuristic. We could tweak it so it considers the children of a node. That means if we ask now, he'll return the cost up to him + the most promising childcost. As the heuristic now knows a bit more, it can give a slightly better answer. In our example this might not help much, in fact it just saves us one deoth level of searching before finding a best path. Now we can imagine having a heuristic that just knows the whole tree. So it can precisely determine the true cost to the end for every node. This is major cheatage. But it's what we call h*. The most accurate heuristic. Why even bother? For many problems there's sweet spot between h* (whose calculation includes the problem we're trying to solve (i.e. finding the shortest path) so that's stupid) and the dtupid one we used. The overhead of calculating the heuristic is worth it in those cases. I apologize, this is way longer than I expected. But explaining is also just heuristics when I think about it. Hmm... 
Member since Apr 2018
15 posts

20190203, 13:31 #5
I am amazed!
Thank you for educating and entertaining me 
Datenschutz 
Kontakt
Powered by the Unclassified NewsBoard software, 20150713dev,
© 20032011 by Yves Goergen