Skip to content

Commit 523c112

Browse files
author
magicindian
committed
checking in search tests
1 parent c0f6546 commit 523c112

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/aima/test/search/MisplacedTileHeuristicFunctionTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ public void testHeuristicCalculation() {
1818
MisplacedTilleHeuristicFunction fn = new MisplacedTilleHeuristicFunction();
1919
EightPuzzleBoard board = new EightPuzzleBoard(new int[] { 2, 0, 5, 6,
2020
4, 8, 3, 7, 1 });
21-
assertEquals(7, fn.getHeuristicValue(board));
21+
assertEquals(7.0, fn.getHeuristicValue(board));
2222

2323
board = new EightPuzzleBoard(new int[] { 6, 2, 5, 3, 4, 8, 0, 7, 1 });
24-
assertEquals(6, fn.getHeuristicValue(board));
24+
assertEquals(6.0, fn.getHeuristicValue(board));
2525

2626
board = new EightPuzzleBoard(new int[] { 6, 2, 5, 3, 4, 8, 7, 0, 1 });
27-
assertEquals(7, fn.getHeuristicValue(board));
27+
assertEquals(7.0, fn.getHeuristicValue(board));
2828
}
2929
}

src/aima/test/search/searches/RecursiveBestFirstSearchTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public void setUp() {
3434
new AStarEvaluationFunction());
3535

3636
heuristicFunction = new HeuristicFunction() {
37-
public int getHeuristicValue(Object state) {
37+
public double getHeuristicValue(Object state) {
3838
return SimplifiedRoadMapOfPartOfRomania
3939
.getStraightLineDistancesToBucharest().getDistance(
4040
(String) state,

0 commit comments

Comments
 (0)