AI Practice
文章平均质量分 72
Blue_Nocturne
这个作者很懒,什么都没留下…
展开
-
AI-N Queen Problem(dfs)
#include //the biggest N of this dfs method is 29(4s)#include #include using namespace std;int col[50];//col[row] seems the col of queen in the rowint n;bool check(int r,int c){ int i;原创 2015-09-16 16:37:02 · 575 阅读 · 0 评论 -
AI--N Queens Problem(Look-Back method)
#include #include #include using namespace std;int col[10];//col[row] seems the col of queen in the rowbool check(int r,int c){ int i; for(i=1;i//make sure all原创 2015-09-09 16:20:06 · 447 阅读 · 0 评论 -
AI-N Queen Problem(bfs)
#include //because of the limit of the queue's length,the biggest N is only 14(2s).And I really don't think bfs is a good way to solve this queen problem.#include #include #define BG 10000000usin原创 2015-09-16 16:37:46 · 556 阅读 · 0 评论 -
AI-路径导航(最短路径算法 and A算法)
输入: 城市坐标文件,需导航两个城市编号输出:路径序列就路径长度2.1 试采用最短路径算法实现,分析其存在的主要问题;2.2 设计适当的启发式策略,采用A算法实现最短路径:#include //with this method,we can find all the shortest ways from the start point to any other poin原创 2015-09-19 14:43:57 · 4871 阅读 · 1 评论