180

Best First Search: Graphs

package graphs; import java.util.*; import graphs.State; public class GraphImplementation { public void dfs(Node root) { //Avoid infinite loops if(root == null) return; System.out.print(root.getVertex() + “t”); root.state = State.Visited; //for every child for(Node n: root.getChild()) { //if childs state is not visited then recurse if(n.state == State.Unvisited) { dfs(n); } } } public void bfs(Node root) …

178

Asignación 7: Cilog

A. tell brothers(X,Y) <- brother(X,Y). tell brothers(X,Y) <- sister(X,Y). tell sister(nathalia,nieves). tell brother(carlos,beltran). tell parent(X,Y) <- father(X,Y). tell parent(X,Y) <- mother(X,Y). tell brothers(Q,W) <- parent(X,Q) & parent(X,W). tell father(walt,carlos). tell father(walt,nathalia). tell mother(ana,carlos). tell mother(ana,nathalia). ask brothers(nathalia,nieves).   tell male(X). tell female(X). ask female(nathalia). B. tell pinta(X) <- ~fotografos (X). tell escultores(X) <- ~fotografos(X). tell …

169

Proyecto Final (2016)

Kevin Flores Alvarez 201-30-5386 Monografia: Inteligencia Artificial Abstract The definition of artificial intelligence is evolving constantly, and so are the mentalities of society. In a world where humans are always leaning on technology, some key questions need to be answered before embarking on the journey of artificial intelligence; Can it be done? If so, what …