wumpus_world.h
来自「人工智能课堂作业」· C头文件 代码 · 共 50 行
H
50 行
#ifndef _WUMPUS_WORDL_HH#define _WUMPUS_WORDL_HH#include "types.h"class Wumpus_World{ private: //unsigned int max_x; // the maximum y-coordinate //unsigned int max_y; // the maximum x-coordinate int adjacent(const Object OBJECT); int current(const Object OBJECT); // these function do perform an action void do_UpForward(); void do_RightForward(); void do_LeftForward(); void do_Grab(); void do_Shoot(int x,int y,Action ac,Object w[5][5]); void do_DownForward(); // this function switches between actions public:
Object world[5][5]; // the world AgentInfo agent; // information about the agent void init(); // initialize Wumpus World
void reset_agent(); void show(Percept percept1[5][5],Object w[5][5]); void set_percepts(); // set percept for agent
void do_action(const Action ACTION,int x,int y,Action a,Object w[5][5]); // void evaluate(Abstract_Agent &a, const unsigned int MAX_STEPS); Wumpus_World(); ~Wumpus_World(); };#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?