OKAY, the main cpp file, “EightPuzz.cpp”
Here’s the code that kicks the thing off ! Its very simple. #include"Eightpuzz.h"
int main() {
char Choice=0;
cout << "Choose Search Method...\n"
<< " [1] Blind Breadth First
Search\n"
<< " [2] Blind Depth First Search\n"
<< " [3] A*(Tiles in the wrong
position)\n"
<< " [4] A*(Manhattan Distance)\n"
<< endl;
cin >> Choice;
switch(Choice) {
case '1':
// call Blind Breadth First Search
GeneralSearch(BREADTH_FIRST, NOT_USED);
break;
case '2':
// call Blind Depth First Search
GeneralSearch(DEPTH_FIRST, NOT_USED);
break;
case '3':
// call A* with wrong tiles heuristic
GeneralSearch(DEPTH_FIRST, WRONG_TILES);
break;
case '4':
// call A* with manhatten heuristic
GeneralSearch(DEPTH_FIRST, MANHATTAN_DISTANCE);
break;
}
return 0;
}
AI 1 - Problem Solving (Artificial intelligence)
- Introduction
- Methods Theory
- Coding
- Linked List
- Main Loop
- Final bit of code
- Conclusion
Final bit of code
You might also like...
C++ books
-
C++ Primer Plus (6th Edition) (Developer's Library)
C++ Primer Plus is a carefully crafted, complete tutorial on one of the most significant and widely used programming languages today. A friendly and easy-to-use self-study guide, this book is appropriate for both serious students of programming as we...
C++ forum discussion
-
how can i in C++ send file to other PC over net ?
by greensqeq (7 replies)
-
QUERY: How to control external exe & read it's process details
by swiftsafe (2 replies)
-
Sorting parallel arrays in C
by joeyMABIA (4 replies)
-
help me with a problem anybody?
by Schleons (5 replies)
-
Logic Warz - Program your own Bot, battle other people's Bots
by Peter767 (2 replies)
C++ podcasts
-
GoingDeep: C++ and Beyond 2012: Herb Sutter - atomic<> Weapons, 2 of 2
Published 8 years ago, running time 4h1m
Herb Sutter presents atomic<> Weapons, 2 of 2. This was filmed at C++ and Beyond 2012. As the title suggests, this is a two part series (given the depth of treatment and complexity of the subject matter).STOP! => Watch part 1 first!Abstract:This session in one word: Deep.It's
C++ jobs
-
Software Developer - Edinburgh
Runtime Revolution in Edinburgh (EH2), United Kingdom
£25-40k (DOE) -
C++ Unix Developer
Flexton Inc. in San Jose, United States
-
Experienced C++ Developer
Pando Networks in New York, United States
Pando Networks offers employees a generous benefits package which includes health and dental care, short and long term disability, life insurance and retirement plans. The compensation offered for the position will commensurate with experience.
Comments