Click here to Skip to main content
15,895,781 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
I need your help to solve the following problem urgently
the program belongs to my Artificial intelligence course
My problem is how to connect the maze to the problem:


this program shall use the console as output (NO GRAPHICS!)
The algorithms will perform in a maze that has to be created.
The maze shall be as large as the screen of the console in the end)
The maze shall be modified in that way, that about 50% off the walls shall be erased (to ease the complexity of the problem)

Simple traveling salesman.
10 agents have to act in a simple maze (missing 50% of the walls).
The agents start in arbitrary but uniformly distributed starting positions in the maze.
There are as many goals as agents, distributed uniformly in the maze.
The agents have to visit all the goals one by one.
The agents do know the location of the goals from the beginning.
The agents vanish from the maze if they've reached all goals.
The agents can visit the goals in an arbitrary order (this should be optimized too!) If a goal is occupied by another agent, the agent is allowed to change the goal. Agents cannot go through walls or other agents.
The agents shall use as less steps as possible.
Posted
Updated 7-Oct-12 6:10am
v2

Okay, so you need to do two things at once - navigate within a maze and visit a list of arbitrary destinations.

So, use an function that works out the number of steps from one place in the maze to another.

Now, use the results of that function to assess the distance from your position to each of the destinations. After you've decided on the best destination to visit next, you trace the path used in the distance function to get to your destination. Repeat until all destinations have been visited.



Please, please, PLEASE - read this page: Tips to getting better answers in forums
 
Share this answer
 
That is just your homework question, complete.

It doesn't work like that. You try to do it, you get stuck, you ask for help on your specific problem.

We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!
 
Share this answer
 
Comments
MSA6585 7-Oct-12 11:56am    
Yes I've said it my self that it's a homework.

I've not asked any one to do it for me.

I ask for guidance in relating maze and salesman problem
OriginalGriff 7-Oct-12 12:14pm    
And what have you tried so far? What have you got so far?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900