迷宫中的简单旅行推销员(A *) [英] Simple Traveling salesman in Maze (A*)

查看:78
本文介绍了迷宫中的简单旅行推销员(A *)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要您的帮助来紧急解决以下问题
该程序属于我的人工智能课程
我的问题是如何将迷宫连接到问题:


该程序应将控制台用作输出(无图形!)
该算法将在必须创建的迷宫中执行.
迷宫应与控制台的屏幕一样大)
迷宫应以这种方式进行修改,以消除大约50%的墙壁(以减轻问题的复杂性)

简单的旅行推销员.
10名特工必须在一个简单的迷宫中行动(丢失了50%的墙壁).
代理从迷宫中任意但均匀分布的起始位置开始.
目标与行动者一样多,均匀分布在迷宫中.
代理商必须逐一探访所有目标.
代理商确实从一开始就知道目标的位置.
如果特工们达成了所有目标,他们就会从迷宫中消失.
代理可以以任意顺序访问目标(这也应该进行优化!)如果一个目标被另一个代理占用,则允许该代理更改目标.特工不能穿过墙壁或其他特工.
代理程序应使用尽可能少的步骤.

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.

推荐答案

好,所以您需要一次做两件事-在迷宫中导航并访问任意目的地列表.

因此,使用可以计算从迷宫中的一个地方到另一个地方的步数的函数.

现在,使用该函数的结果来评估从您的位置到每个目的地的距离.确定了下一个最佳目的地之后,您可以跟踪距离函数中使用的路径以到达目的地.重复直到访问完所有目的地.



请,请-请阅读此页面:在论坛中获得更好答案的提示
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


这只是您的家庭作业问题,

它不是那样工作的.您尝试这样做,遇到困难,就特定问题寻求帮助.

我们不做您的作业:这是有原因的.在这里,您可以考虑自己被告知的内容,并尝试理解它.也可以在那里帮助您的导师识别您的弱点,并将更多的注意力放在补救措施上.

自己尝试,您可能会发现它并不像您想的那么困难!
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!


这篇关于迷宫中的简单旅行推销员(A *)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆