Questions tagged [heuristics]

Heuristics refers to the use of algorithms to deal with highly complex problems.

Heuristics refers to the use of algorithms to deal with highly complex problems. A heuristic approach seeks to provide an approximate solution for a problem that is otherwise unsolvable.

683 questions
0
votes
1 answer

Classifying Lucene results for better precision

I have a Lucene index containing 5 million entries. I query this index with "distorted" snippets of the indexed documents. Then, I get the top 1 document and its score. From those data, I need to tell if the returned document is correct. My first…
0
votes
1 answer

Heuristic function of A* search for sorting

My problem is sorting strings given in three lists using implementation of A* search,so I need to develop a heuristic function that will make solving various instances of this problem efficient. The state can be represented s a list of 3 lists,…
0
votes
3 answers

Big-O notation of a function in Java by experiment

I need to write a program that determines the Big-O notation of an algorithm in Java. I don't have access to the algorithms code, so it must be based on experimentation and execution times. I don't know where to start. Can someone help me? Edit:…
0
votes
1 answer

Weird behavior in A* algorithm with diagonal heuristic

I'm playing with the A* algorithm, so I can take a picture of a maze with a webcam and have a program solve it. Here are the results: When I use h = 0, I get a nice solution. Using manhattan distance also gives a good solution. However, diagonal…
cory2067
  • 39
  • 7
0
votes
1 answer

Is backtracking considered an heuristic?

More specifically, I am trying to figure out if the following statement is correct: Every BackTracking is an Heuristic but not every Heuristic is a BackTracking. Am I right? Cause I feel I am missing something and messing things up.
Gtondato
  • 13
  • 6
0
votes
1 answer

How do I create a program that does an A* search to solve an 8 puzzle all in one Java Source file?

I have to make a program that takes in an 8 puzzle as an array, checks to see if it is solvable (and catches any input errors), and then uses A* search to solve the puzzle if it is solvable, displaying the sequence of moves to solve the 8 puzzle…
cluemein
  • 884
  • 13
  • 27
0
votes
1 answer

Guessing the time zone from an arbitrary "location" string?

I'm trying to run some statistics over the Stack Overflow data dump, and for that I would like to know the time zone for each user. However, all I have to go on is the completely free-form "location" string. I'll stress that I'm only looking for an…
Thomas
  • 174,939
  • 50
  • 355
  • 478
0
votes
1 answer

Running time of Construction Heuristic in OptaPlanner

I am using the OptaPlanner to optimize a chained planning problem which is similar to the VehicleRoutingExample. My planning entities have a planning variable which is another planning entity. Now I am testing a huge dataset with ca. 1500 planning…
Jon As
  • 15
  • 1
  • 5
0
votes
1 answer

Metaheuristic shuffle

I am currently working on a NP-complete problem, and have implemented a personal genetic algorithm for this purpose. The results are more than I could have expected. With a well-designed fitness function and a couple population/mutation carefully…
user3790428
0
votes
1 answer

What would be a good heuristic to solving this?

The aim is to guide a bot from Source S to Goal G while passing through all the checkpoints @ (in any order). The cells marked as # cannot be accessed. The bot can move on locations marked . ######## #@....G# ##.##@## #..@..S# #@.....# ######## One…
Sinstein
  • 887
  • 11
  • 42
0
votes
1 answer

Heuristic for finding the shortest path on a map

I have used the Dijkstra algorithm for finding the shortest path between two stations on a map. The cost of going from one station to another is the same at every link. However, the problem is that Dijkstra tries to find the least cost path from the…
Ashwin
  • 12,691
  • 31
  • 118
  • 190
0
votes
1 answer

ai: Determining what tests to run to get most useful data

This is for http://cssfingerprint.com I have a system (see about page on site for details) where: I need to output a ranked list, with confidences, of categories that match a particular feature vector the binary feature vectors are a list of site…
Sai
  • 6,919
  • 6
  • 42
  • 54
0
votes
2 answers

walk through all vertices in a non-hamiltonian, unweighted, undirected graph

I would like to find a heuristic or algorithm to solve a Travelling Sales Person-like problem with some key differences: -The graph is unweighted. (so the cost of walking from any one vertex to a connected vertex is 1) -I want to go through each…
0
votes
1 answer

What is correct implementation of IDA* algorithm with manhattan heuristic?

I am trying to implement IDA* algorithm to solve 15 puzzle problem in objective C, I have implemented the algorithm very well but not getting the exact result. Here is my code- - (TreeNode *)IDAStarSolution:(TreeNode *)startState { int limit =…
Ravi Gupta
  • 175
  • 2
  • 11
0
votes
1 answer

Heuristic for shifting array

Given a goal state int final[3][3]={{1,2,3}, {4,5,6}, {7,8,9}}; and a random initial state, I want to sort my array as final only by shifting rows (right or left) and columns (up and down) of my table 7 8 4 …