heuristics

Is best first search optimal and complete?

自作多情 提交于 2019-12-10 18:09:48
问题 I have some doubts regarding best first search algorithm. The pseudocode that I have is the following: best first search pseudocode First doubt: is it complete? I have read that it is not because it can enter in a dead end, but I don't know when can happen, because if the algorithm chooses a node that has not more neighbours it does not get stucked in it because this node is remove from the open list and in the next iteration the following node of the open list is treated and the search

List of UAC prompt triggers?

为君一笑 提交于 2019-12-10 15:50:56
问题 I just ran an old program I had written years ago, several years before Vista was released. Windows (7) gave me the UAC prompt and asked for permission to run it. I was surprised because it is a relatively simple program which does nothing too fancy and certainly nothing that should require elevated privileges. I then checked the directory and sure enough, Windows is overlaying the shield icon on the program. I did a quick scan of the code and do not see anything that would obviously trigger

A* Algorithm with Manhattan Distance Heuristic

半世苍凉 提交于 2019-12-10 11:22:33
问题 I've been working on a 15-puzzle solver in C. And I had some issues with the huge amounts of memory that my code uses. I won't be posting my code because it's too long... I've implemented most of the libraries I'm using and it will probably just bring confusion to you. Let's start on the basics. The things that I'm using right now are: (All of them implemented in C) - Fibonacci Heap: /* Struct for the Fibonacci Heap */ typedef struct _fiboheap { int size; // Number of nodes in the heap node

What algorithm would you use to solve a very large tic-tac-toe game?

早过忘川 提交于 2019-12-09 07:03:25
问题 A small (3x3, 4x4) tic-tac-toe can be easily solved by considering all the cases. But for example, you have a 30x30 tic-tac-toe. What algorithm would you use to decide the next best move in that case? Minimax + alpha-beta pruning is one way that I know. Is there some other way that is more efficient/not more efficient but cooler? I know it would not be a very interesting game to play. I said 30x30 just to ask what I wanted to i.e. which algorithms work best at these sort of games where the

What are some common admissible heuristics for distance? [closed]

自闭症网瘾萝莉.ら 提交于 2019-12-08 11:15:41
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago . What are the most common heuristics used to estimate distance in intelligent search problems? In particular, I'm interested in metrics that can (usually) be used as admissible heuristics for A* search. I came across straight line distance and Manhattan distance but are there any

Seeking a solution or a heursitic approxmation for the 3-partition combinatorial situation

♀尐吖头ヾ 提交于 2019-12-07 20:55:49
问题 How do I distribute 48 items each with its own dollar value to each of 3 inheritors so that the value given to each is equal or nearly equal? This is a form of partitioning problem with is NP-complete (or some such) and therefore impossible to perfectly answer with 48 items. I'm looking for a practical and generally acknowledged approximate algorithm to do this. It's a problem faced by many in resolving wills and estates. Answer must be out there somewhere! The answer could be a computer

Number of simple mutations to change one string to another?

匆匆过客 提交于 2019-12-07 08:52:25
问题 I'm sure you've all heard of the "Word game", where you try to change one word to another by changing one letter at a time, and only going through valid English words. I'm trying to implement an A* Algorithm to solve it (just to flesh out my understanding of A*) and one of the things that is needed is a minimum-distance heuristic. That is, the minimum number of one of these three mutations that can turn an arbitrary string a into another string b: 1) Change one letter for another 2) Add one

Iterative Deepening A Star (IDA*) to solve n-puzzle (sliding puzzle) in Java

我怕爱的太早我们不能终老 提交于 2019-12-06 09:32:11
问题 I've implemented a program able to solve the n-puzzle problem with A*. Since the space of the states is too big I cannot precompile it and I have to calculate the possible states at runtime. In this way A* works fine for a 3-puzzle, but for a 4-puzzle can take too long. Using Manhattan distance adjusted with linear conflicts, if the optimal solution requires around 25 moves is still fast, around 35 takes 10 seconds, for 40 takes 180 seconds. I haven't tried more yet. I think that's because I

A* Algorithm with Manhattan Distance Heuristic

我们两清 提交于 2019-12-06 09:14:38
I've been working on a 15-puzzle solver in C. And I had some issues with the huge amounts of memory that my code uses. I won't be posting my code because it's too long... I've implemented most of the libraries I'm using and it will probably just bring confusion to you. Let's start on the basics. The things that I'm using right now are: (All of them implemented in C) - Fibonacci Heap: /* Struct for the Fibonacci Heap */ typedef struct _fiboheap { int size; // Number of nodes in the heap node min; // Pointer to the minimun element in the Heap funCompare compare; // Function to compare within

Seeking a solution or a heursitic approxmation for the 3-partition combinatorial situation

陌路散爱 提交于 2019-12-06 07:28:34
How do I distribute 48 items each with its own dollar value to each of 3 inheritors so that the value given to each is equal or nearly equal? This is a form of partitioning problem with is NP-complete (or some such) and therefore impossible to perfectly answer with 48 items. I'm looking for a practical and generally acknowledged approximate algorithm to do this. It's a problem faced by many in resolving wills and estates. Answer must be out there somewhere! The answer could be a computer script or just a manual method. A heuristic that is "Generally Accepted" would suffice. With my programmer