This project is divided into parts. Part 1 contains some methods and simple data structures that you
have to develop. And of course an application function. What you should do keep track of the
modules that you build and understand what you are doing as you might have to produce variant
versions of any codeline. You will build more into the project as you go.
Building and testing “link” data structure. This part is composed of 3 codelines ([login to view URL], [login to view URL],
[login to view URL]) and a baseline (composed of the 3 codelines).
file: [login to view URL]: contains the application function and a unit test for the baseline.
file: link.h: contains the definition of the class link
class name: link
private class members: char c1, char c2, float linkCost
public class methods:
default constructor,a constructor that sets all three private class members,a destructor,a =operator,and methods to query the private class members.
file: [login to view URL]: contains the implementation of the class link .
file: acquireLinks.h: contains the function signature: void acquireLinks(vector<link> &links) .
file: [login to view URL] : in this file you will implement the function acquireLinks to read links data
from a file. A perfect example of an input file for a uniform cost search algorithms would be a file
that contains the following (using the example presented in class):
file: node.h : contains the definition of the class node
class name: node
private class members: char name; node* pParent; node* pNext; float cost; bool explored;
public class methods: default constructor,
a constructor that sets all 5 private class members,a destructor,a =operator, a function isGoal with signature: bool isGoal(char goalCity),methods to query the private class members (i.e. to guarantee data
file: [login to view URL] : contains the implementation of the class node. The function isGoal: returns true if
the calling node name is the same as the goalCity, and returns false otherwise.
file: list.h: contains the definition of the class list
class name: list
private class members: ndoe* pFirstNode, node* pLastNode
public class members: default constructor,a constructor that sets all private class members,a destructor,a =operator,a function printList with signature: void printList(void),methods to query the private class members (i.e. to guarantee data
file: [login to view URL] : contains the implementation of the class list. The function printList prints out on
console the names of the nodes in the calling list (it should be easily modified to bring any
information about the nodes in the calling list.
Build the following function: void list::printResult(void)
//this function is to print (to console) the solution path along with its cost. It should also
display number of nodes expanded (i.e. how many times the method
node::expand(vector<link>, list*) was called
Build the following function: void list::printList(void)
//update this function such that it prints to console (for a given node):
name parent's name cost
e.g. b a 4
file: node.h: add 2 functions with signature:
void expand(vector<link> &links, list* pFrontier);
void pushNodeToList(list* pFrontier);
file: [login to view URL]: conatins the implementation of the function: expand: that finds potential sibling
nodes of the calling node and pushes potential nodes to list pFrontier (by calling
Build the following function: bool node::isQualified(list* pFrontier)
// this function determines if the calling node (which is a potential node) is qualified to be
added to the input argument list. The function should also discard from the list any node
once a cheaper replacement for it is found.
file: [login to view URL]: should now construct the first node, initialize the Frontier list using the first node,
expand potential siblings to the list, and terminates only if a goal is picked.
Update all the required methods/classes such that the algorithm is capable of solving the search
problem using any of the 5 studied algorithms.
4 freelancers are bidding on average $31 for this job
Hi, I can help you. I am a CS undergrad studying at the top ranked university of my country. I have over 7 years of programming experience and I will not waste your time. Please PM for details. Regards, Usama
Computer engineering student with great experience in C++, Java, ActionScript, Python, XML and HTML. I'll finish you're program as fast as I can and will update you on the progress regularly.