Question: #ifndef DATA _ TYPES _ H #define DATA _ TYPES _ H / / = = = = = = = = = = =

#ifndef DATA_TYPES_H
#define DATA_TYPES_H
//==================== WRITE YOUR OPTIONAL DATA TYPES IF YOU NEED =============
enum CITIES
{
Arad, Bucharest, Craiova, Drobeta, Eforie,
Fagaras, Giurgiu, Hirsova, Iasi, Lugoj,
Mehadia, Neamt, Oradea, Pitesti, Rimnicu_Vilcea,
Sibiu, Timisoara, Urziceni, Vaslui, Zerind
};
//====== WRITE YOUR COMPULSORY (BUT SPECIFIC TO THE PROBLEM) DATA TYPES =======
enum ACTIONS // All possible actions
{
Go_Arad, Go_Bucharest, Go_Craiova, Go_Drobeta, Go_Eforie,
Go_Fagaras, Go_Giurgiu, Go_Hirsova, Go_Iasi, Go_Lugoj,
Go_Mehadia, Go_Neamt, Go_Oradea, Go_Pitesti, Go_Rimnicu_Vilcea,
Go_Sibiu, Go_Timisoara, Go_Urziceni, Go_Vaslui, Go_Zerind
};
typedef struct State
{
enum CITIES city;
float h_n; // Heuristic function
}State;
//================== YOU DO NOT NEED TO CHANGE THIS PART ======================
enum METHODS
{
BreastFirstSearch =1, UniformCostSearch =2, DepthFirstSearch =3,
DepthLimitedSearch=4, IterativeDeepeningSearch =5, GreedySearch =6,
AStarSearch =7, GeneralizedAStarSearch =8
};
// This struct is used to determine a new state and action in transition model
typedef struct Transition_Model
{
State new_state;
float step_cost;
}Transition_Model;
typedef struct Node
{
State state;
float path_cost;
enum ACTIONS action; //The action applied to the parent to generate this node
struct Node *parent;
int Number_of_Child; // required for depth-first search algorithms
}Node;
typedef struct Queue // Used for frontier
{
Node *node;
struct Queue *next;
}Queue;
#endif change this code for 8 puzzle game

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!