2013年7月25日

A* pseudocode

摘要: struct node { node *parent; int x, y; float f, g, h;} // A*initialize the open listinitialize the closed listput the starting node on the open list (you can leave its f at zero)while the open list is not empty find the node with the least f on the open list, call it "q" pop q off the ... 阅读全文

posted @ 2013-07-25 16:30 fishyk 阅读(189) 评论(0) 推荐(0) 编辑

DFS ,BFS Pseudocode

摘要: // Simple dfsfunction dfs(node position) color(position) for each successor adjacent to node "position" if successor is colored, skip it if next is the goal node, stop the search else, dfs(successor) endend// Simple bfsstructure node position pos node *parentendfu... 阅读全文

posted @ 2013-07-25 14:52 fishyk 阅读(356) 评论(0) 推荐(0) 编辑

导航