Question: #ifndef DATA _ TYPES _ H #define DATA _ TYPES _ H / / = = = = = = = = = = =
#ifndef DATATYPESH
#define DATATYPESH
WRITE YOUR OPTIONAL DATA TYPES IF YOU NEED
enum CITIES
Arad, Bucharest, Craiova, Drobeta, Eforie,
Fagaras, Giurgiu, Hirsova, Iasi, Lugoj,
Mehadia, Neamt, Oradea, Pitesti, RimnicuVilcea,
Sibiu, Timisoara, Urziceni, Vaslui, Zerind
;
WRITE YOUR COMPULSORY BUT SPECIFIC TO THE PROBLEM DATA TYPES
enum ACTIONS All possible actions
GoArad, GoBucharest, GoCraiova, GoDrobeta, GoEforie,
GoFagaras, GoGiurgiu, GoHirsova, GoIasi, GoLugoj,
GoMehadia, GoNeamt, GoOradea, GoPitesti, GoRimnicuVilcea,
GoSibiu, GoTimisoara, GoUrziceni, GoVaslui, GoZerind
;
typedef struct State
enum CITIES city;
float hn; Heuristic function
State;
YOU DO NOT NEED TO CHANGE THIS PART
enum METHODS
BreastFirstSearch UniformCostSearch DepthFirstSearch
DepthLimitedSearch IterativeDeepeningSearch GreedySearch
AStarSearch GeneralizedAStarSearch
;
This struct is used to determine a new state and action in transition model
typedef struct TransitionModel
State newstate;
float stepcost;
TransitionModel;
typedef struct Node
State state;
float pathcost;
enum ACTIONS action; The action applied to the parent to generate this node
struct Node parent;
int NumberofChild; required for depthfirst search algorithms
Node;
typedef struct Queue Used for frontier
Node node;
struct Queue next;
Queue;
#endif change this code for puzzle game
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
