Skip to content

Commit dadbcf8

Browse files
authored
Merge pull request #9 from jsuyash1514/OnlineSearch
Add nd4j and dl4j examples
2 parents abe4a65 + 4d67b1d commit dadbcf8

File tree

33 files changed

+2588
-93
lines changed

33 files changed

+2588
-93
lines changed

8Puzzle/.idea/8Puzzle.iml

Lines changed: 1 addition & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

8Puzzle/.idea/workspace.xml

Lines changed: 52 additions & 66 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Aima-core/8Puzzle/.idea/workspace.xml

Lines changed: 18 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Aima-core/8Puzzle/src/AStar.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class AStar {
1616

1717
public static void main(String[] args){
1818

19-
EightPuzzleBoard board = new EightPuzzleBoard(new int[] { 7, 1, 8, 0, 4, 6, 2, 3, 5 });
19+
EightPuzzleBoard board = new EightPuzzleBoard(new int[] { 1 ,7 ,4 ,3 ,0 ,2 ,6 ,8 ,5 });
2020
Problem<EightPuzzleBoard, Action> problem = new GeneralProblem<>(board, EightPuzzleFunctions::getActions,
2121
EightPuzzleFunctions::getResult,
2222
GoalTest.isEqual(EightPuzzleFunctions.GOAL_STATE));

Aima-core/8Puzzle/src/Eight_Puzzle.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class Eight_Puzzle {
1010

1111
public static void main(String[] args){
1212

13-
EightPuzzleBoard board = new EightPuzzleBoard(new int[] { 7, 1, 8, 0, 4, 6, 2, 3, 5 });
13+
EightPuzzleBoard board = new EightPuzzleBoard(new int[] { 1, 3, 4, 2, 8, 5, 0, 6, 7 });
1414
Problem<EightPuzzleBoard, Action> problem = new GeneralProblem<>(board, EightPuzzleFunctions::getActions,
1515
EightPuzzleFunctions::getResult,
1616
GoalTest.isEqual(EightPuzzleFunctions.GOAL_STATE));

Aima-core/8Puzzle/src/GreedyBestFirst.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
public class GreedyBestFirst {
1717
public static void main(String[] args){
18-
EightPuzzleBoard board = new EightPuzzleBoard(new int[] { 7, 1, 8, 0, 4, 6, 2, 3, 5 });
18+
EightPuzzleBoard board = new EightPuzzleBoard(new int[] { 1 ,7 ,4 ,3 ,0 ,2 ,6 ,8 ,5 });
1919
Problem<EightPuzzleBoard, Action> problem = new GeneralProblem<>(board, EightPuzzleFunctions::getActions,
2020
EightPuzzleFunctions::getResult,
2121
GoalTest.isEqual(EightPuzzleFunctions.GOAL_STATE));
@@ -27,9 +27,10 @@ public static void main(String[] args){
2727

2828
try {
2929
SearchForActions<EightPuzzleBoard, Action> search = new GreedyBestFirstSearch<>(new GraphSearch<>(),
30-
EightPuzzleFunctions.createManhattanHeuristicFunction());
30+
eightPuzzleFunctions.createManhattanHeuristicFunction());
3131
SearchAgent<EightPuzzleBoard, Action> agent = new SearchAgent<>(problem, search);
3232
List<Action> actions = agent.getActions().subList(0, agent.getActions().size());
33+
System.out.println(actions.size());
3334
for (int i=0;i<actions.size();i++){
3435
System.out.print("Current State = " + Arrays.toString(state));
3536
EightPuzzleBoard eightPuzzleBoard = new EightPuzzleBoard(state);

Aima-core/Uninformed Searches/.idea/workspace.xml

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)