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
24
votes
1 answer

Manhattan distance is over estimating and making me crazy

I'm implementing a-star algorithm with Manhattan distance to solve the 8-puzzle (in C). It seems to work very well and passes a lot of unit tests but it fails to find the shortest path in one case (it finds 27 steps instead of 25). When I change the…
Babak
  • 582
  • 4
  • 14
23
votes
5 answers

Data Type Recognition/Guessing of CSV data in python

My problem is in the context of processing data from large CSV files. I'm looking for the most efficient way to determine (that is, guess) the data type of a column based on the values found in that column. I'm potentially dealing with very messy…
poezn
  • 4,009
  • 4
  • 25
  • 27
23
votes
2 answers

A* admissible heuristics on a grid with teleporters?

Suppose that you have a 2D grid of cells, some of which are filled in with walls. Characters can take a step from one square to any square that is one step horizontal or vertical from it, but cannot cross walls. Given a start position and an end…
templatetypedef
  • 362,284
  • 104
  • 897
  • 1,065
22
votes
3 answers

What is the difference between monotonicity and the admissibility of a heuristic?

I'm reading over my AI textbook and I'm curious about what the difference is between monotonicity and admissibility of heuristics (I know they aren't mutually exclusive). As far as I can tell, an admissible heuristic simply means you are ensured to…
mmcdole
  • 91,488
  • 60
  • 186
  • 222
21
votes
4 answers

How to strip headers/footers from Project Gutenberg texts?

I've tried various methods to strip the license from Project Gutenberg texts, for use as a corpus for a language learning project, but I can't seem to come up with an unsupervised, reliable approach. The best heuristic I've come up with so far is…
heartpunk
  • 2,235
  • 1
  • 21
  • 26
20
votes
6 answers

Are all scheduling problems NP-Hard?

I know there are some scheduling problems out there that are NP-hard/NP-complete ... however, none of them are stated in such a way to show this situation is also NP. If you have a set of tasks constrained to a startAfter, startBy, and duration all…
18
votes
2 answers

Can someone give me an example of admissible heuristic that is not consistent?

In this figure: let's assume that h(C)=1 If f(A)=g(A)+h(A)=0+4=4, and f(C)=g(C)+h(C)=1+1=2 Then f(C) is NOT greater than or equal to f(A) Therefore this example is consistent and admissible, but can someone give me an example of admissible…
user3880907
  • 271
  • 2
  • 4
  • 10
15
votes
4 answers

Packing arbitrary polygons within an arbitrary boundary

I was wondering if anybody could point me to the best algorithm/heuristic which will fit my particular polygon packing problem. I am given a single polygon as a boundary (convex or concave may also contain holes) and a single "fill" polygon (may…
Craig
  • 564
  • 1
  • 5
  • 20
15
votes
8 answers

What is the state of the art in computer chess tree searching?

I'm not interested in tiny optimizations giving few percents of the speed. I'm interested in the most important heuristics for alpha-beta search. And most important components for evaluation function. I'm particularly interested in algorithms that…
Łukasz Lew
  • 48,526
  • 41
  • 139
  • 208
15
votes
6 answers

Is there anything for Python that is like readability.js?

I'm looking for a package / module / function etc. that is approximately the Python equivalent of Arc90's readability.js http://lab.arc90.com/experiments/readability http://lab.arc90.com/experiments/readability/js/readability.js so that I can give…
Emre Sevinç
  • 8,211
  • 14
  • 64
  • 105
14
votes
2 answers

What's a good set of heuristics for threading tweets?

Everyone knows, if you want to thread emails you use Jamie Zawinski's algorithm. But it's a new century, and there's a new messaging service. What's the best algorithm for threading status updates posted on Twitter? Things I'd definitely like it to…
frabcus
  • 919
  • 1
  • 7
  • 18
13
votes
12 answers

What are some games with fairly simple heuristics to evaluate positions?

I'm teaching a kid programming, and am introducing some basic artificial intelligence concepts at the moment. To begin with we're going to implement a tic-tac-toe game that searches the entire game tree and as such plays perfectly. Once we finish…
wxs
  • 5,617
  • 5
  • 36
  • 51
12
votes
7 answers

What is a good heuristic for determining the tab width used in a source file?

I would like to determine the tab width used in source files indented with spaces. This is not hard for files with particularly regular indentation, where the leading spaces are only used for indentation, always in multiples of the tab width, and…
Michael J. Barber
  • 24,518
  • 9
  • 68
  • 88
11
votes
1 answer

How do the Antivirus programs detect the EICAR Test Virus?

The EICAR test virus is used to test the functionality of the anti virus programs. In order to detect it as a virus, Should the antivirus program have the virus definition for the test virus OR The heuristics detect it as a suspicious pattern and…
Chathuranga Chandrasekara
  • 20,548
  • 30
  • 97
  • 138
11
votes
1 answer

Why does A* with admissible non consistent heuristic find non optimal solution?

I know that A* with admissible non consistent heuristic will not find optimal solution but I am struggling with finding example when will it happen. I can not find example because of this thought - after inserting our goal node (with non optimal…
Druudik
  • 955
  • 1
  • 10
  • 32
1
2
3
45 46