English 中文(简体)
Randomly Generate Directedgraph on agrid
原标题:Randomly Generate Directed Graph on a grid

我正试图随机生成一条直线图,以便形成一种类似于oke魔ice的冰ding碎块的燃烧游戏。

This is essentially what I want to be able to randomly generate: http://bulbanews.bulbagarden.net/wiki/Crunching_the_numbers:_Graph_theory

I need to be able to limit the size of the graph in an x and y dimension. In the example in the link, it would be restricted to an 8x4 grid.

我所要处理的问题不是随意造出图表,而是随意造出一张图,我可以在2个空间中适当绘制地图,因为我需要一个声音对面的东西(如岩石),以便在你停止滑坡时能够视力。 这个问题有时是岩石在另外两个节点之间或可能在另一个节点上消失,导致整个图表被打破。

在与我所知的少数人讨论这一问题之后,我们得出了可能导致解决办法的几项结论。 在建立电网时将障碍作为图表的一部分。 首先是完全填满的电网,而只是抽出一条通路,删除能够使这条路发挥作用的区块,尽管这个问题后来变成了要删除的区块,以便你不会意外地引入另一个较短的道路。 我们还认为,动态的方案拟订算法可能是有益的,尽管我们当中没有人太过熟练地制定动态的方案算法。 任何关于这一问题被正式称为(如果它是一个官方图表问题)的想法或提法都非常有用。

问题回答

我不想把它看作是图表问题,因为正如你所说的那样,代表性不完整。 为了产生一种幻灯,我将直接在电网上工作,并工作backwards;首先固定目的地,然后以某种方式从一个或多个地点进入岩石,并顺便添加石块,以到达其他地点,但你绝不会增加一块石块,使目的地走所有道路。

You might want to generate a planar graph, which means that the edges of the graph will not overlap each other in a two dimensional space. Another definition of planar graphs ist that each planar graph does not have any subgraphs of the type K_3,3 (complete bi-partite with six nodes) or K_5 (complete graph with five nodes).

The s a paper on the tempar graphs.





相关问题
XML-RPC Standard and XML Data Type

I was looking at XML-RPC for a project. And correct me if I m wrong, but it seems like XML-RPC has no XML datatype. Are you supposed to pass as a string? or something else? Am I missing something? ...

Is it exists any "rss hosting" with API for creating feeds

I am creating a desktop app that will create some reports. I want to export these reports as RSS or ATOM feeds. I can easily create feeds with Rome lib for Java. But I have no idea how to spread them. ...

Improving Q-Learning

I am currently using Q-Learning to try to teach a bot how to move in a room filled with walls/obstacles. It must start in any place in the room and get to the goal state(this might be, to the tile ...

High-traffic, Highly-secure web API, what language? [closed]

If you were planning on building a high-traffic, very secure site what language would you use? For example, if you were planning on say building an authorize.net-scale site, that had to handle tons ...

Def, Void, Function?

Recently, I ve been learning different programming langages, and come across many different names to initalize a function construct. For instance, ruby and python use the def keyword, and php and ...

热门标签