Java: Artificial Intelligence; Made Easy, w/ Java Programming; Learn to Create your * Problem Solving * Algorithms! TODAY! w/ Machine Learning & Data Structures, 1st Edition (2015)
ARCHIVE A02: Bigger Search Graph
For DFS & BFS, Chapter JAVA-03
For the procedure below, select an IDE of your choice. You may also use online IDE’s such as rextester.com, ideone.com, or codepad.org.
========================= ======
Reference Image:
The code below is based on the default Node structure throughout the book.
Node a = new Node("a");
Node b = new Node("b");
Node c = new Node("c");
Node d = new Node("d");
Node e = new Node("e");
Node f = new Node("f");
Node g1 = new Node("g");
Node h = new Node("h");
Node i = new Node("i");
Node j = new Node("j");
Node k = new Node("k");
Node g2 = new Node("g");
a.children.add(b);
a.children.add(c);
a.children.add(d);
b.children.add(e);
b.children.add(f);
c.children.add(g1);
c.children.add(h);
c.children.add(i);
d.children.add(j);
j.children.add(k);
j.children.add(g2);