Bejeweled Blitz - 它如何断言总会有一个动作?

发布于 2024-08-28 02:57:02 字数 294 浏览 10 评论 0原文

我玩《宝石迷阵闪电战》已经有一段时间了。是的,这是一种瘾。在思考游戏时,我观察到在某些棋盘上,底部会变干(没有动作),只剩下棋盘的顶部可以玩。棋盘的这一部分经常会干涸,并且在上一步棋清除的区域中留下棋步。

电路板永远不会完全干涸,因此显然程序正在进行某种计算,使其能够选择丢弃什么以防止其干涸。

我注意到在这种“模式”中,算法丢弃珠宝是很常见的,这会导致水平区域中出现更多的非干燥区域。也许不太常见的是似乎旨在再次打开板底部的跌落。

所以我的问题是“如何设计一种算法来保证总是有可用的棋步?”

I have been playing Bejeweled Blitz for a while now. Yes, it is an addiction. In thinking about the game, I have observed that on some boards, the bottom runs dry (no moves) leaving only the top part of the board playable. Frequently that part of the board drys up, and one is left with moves in area cleared by the last move.

The board never runs completely dry, so clearly the program is doing some sorts of calculation that allows it to choose what to drop to prevent it from running dry.

I have noticed in this 'mode' that it is very common for the algorithm to drop jewels which causes more non-dry area to appear in the horizontal area. Perhaps less frequent is a drop which seems designed to open up the bottom part of the board again.

So my question is "How would one go about designing an algorithm guarantee that there is always a move available.?"

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

夕色琉璃 2024-09-04 02:57:02

我不久前写了一个三连胜的游戏,我处理这个问题的方法是随机选择要掉落的宝石并计算所有有效的移动。如果所选宝石未提供至少 1 个有效移动,我将选择另一组宝石,依此类推。

I wrote three-in-a-row game a while ago and the way I dealt with that problem is by selecting gems to drop at random and counting all valid moves. If selected gems did not provide at least 1 valid move I would select another set of gems and so on.

浪漫人生路 2024-09-04 02:57:02

这可以通过探索可能的“宝石掉落”空间来解决,然后根据您要求的规则应用评级。较高的评级可能意味着遵循规则,而较低的评级意味着不遵循,然后您选择一个具有最高评级的插槽。

这不容易解释,但基于规则的方法应该可以解决问题。

This is solvable by exploring the space of possible "jewel drops" and then you apply a rating based on your rules you have asked for. Higher rating could mean follows rule and low ratings mean not following then you choose one slot with the highest rating.

This is not easy to explain, but a rule based approach should do the trick.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文