I have to apply the SMA* algorithm for the labyrinth problem in Python. I found just this PDF: pdfSMA, but it didn't help me too much.
I tried to resolve it, but I didn't manage. Any implementation for this algorithm in Python would help me.
The original description of SMA* from the original AIMA book is flawed. If you implement it as described it may not work. The issue is that you need to preserve the ordering of children and be sure to explore unexplored children before re-exploring old children.
Felner introduced the idea of collapse and restore macros which can be very helpful in understanding SMA*. I suggest looking at that paper and then using a similar approach to implement the algorithm.
But, also know that the recent A*+IDA* algorithm may be a better approach than SMA*. (Not much help if it is an assignment.)
Related
As the title says, I am really really really curious about this.
I've been trying to find the cases where you can't use backtracking to solve them but I can't find them.
Share your knowledge please
If there are too many possibilities to check, backtracking search will be impractical - see e.g. http://en.wikipedia.org/wiki/Lighthill_report. There may also be cases where you cannot state the problem simply and clearly enough to recognize the correct answer when you find it.
I'm using Vim plugin neocomplcache. And I hope a better compare_func for neocomplcache's popup menu candidates.
You can find the default compare_func at here.
And here is the issue I post on GitHub.
Reference:
neocomplcache
I'm still newbie on programming, I'm not good on algorithm, basiclly totally do not know the algorithm.
Anyway, I want to know what algorithm or ways is good for this case.
And thanks.
Lately I have been stuck on improving my algorithmic skills. And at this point I am finding myself out of good material for solving grid problems based on dfs and bsf. I somehow managed to do http://www.spoj.pl/problems/POUR1/ with a brute force logic but i recently go-ogled to find out that the problem can be done by bfs. But I can't figure out exactly how to go about it. Can someone please provide some text to read or some kind of explanation to the above mentioned problem so I can add this to my skill set. It would be extremely kind if you could even help me out for these techniques in problems like these http://www.codechef.com/problems/MMANT/ .please help as soon as possible I am really stuck in these kind of problems ant can't move on. It would also be really kind if u could provide a list of good questions about Binary Indexed Trees and segment trees and some more examples of their usage.
Thanks for the help!! :)
One resource I've found useful is The Algorithmist:
The Algorithmist is a resource dedicated to anything algorithms - from
the practical realm, to the theoretical realm. There are also links
and explanation to problemsets.
Also The Algorithm Design Manual by Steve Skiena is extremely useful, especially the second part.
I was searching google for something and saw the post that some one needed a piece of software in which he can take a sheet of material- and that he can maximize the cuts.
he needs to be able to enter the width and the length of the roll.
Then he would enter the sizes of cuts that he would need. After all the sizes are entered, the software would tell me how to cut the material so that he can achieve maximum efficiency.
Possible???
is there some AI involved?
This is referred to as a packing problem and is an important area of research in combinatorics, a field of mathematics. See http://en.wikipedia.org/wiki/Packing_problem
Yes it is possible and done in manufacturing. The simple way to think about it is you try any combination the computer can think of and take the one that is best (brute force). Basically it pretends to make a cut and then sees what is left, makes another pretend cut and sees what is left until the material is gone and then it tries them in a different location/order.
It is an optimization problem and there are many solutions out there.
http://en.wikipedia.org/wiki/Optimization_problem A wiki link that will lead you to many hours of reading.
This is entirely possible. It's just an optimization layout problem. I can't help you code it, but it's definitely possible and I suspect strongly that there are even efficient algorithms to do it.
I would imagine this problem has already solved a long time ago, when people did the calculations rather than software. I dont know the name of the problem, but i have seen that solving the optimal way to pack circlse in a box is a well known mathematical problem.
This is indeed 2D bin packing. As for software, take a look at Drools Planner (open source, java).
See: http://kks.cabal.fi/GoodEnoughSearch
I have gone through quite many papers and sites. I have not found where this algorithm has been presented before, or that someone has made something similar, but better or more general. The algorithm is pretty simple and thus should be found quite easily by anyone facing the same kind of problems I have faced.
It reminds me of the Monte Carlo method.
http://en.wikipedia.org/wiki/Monte_Carlo_method