⛀ 村民跳棋
那位大师级图书管理员的讨价还价可是相当强硬。他们能看穿你“一换二”的机会吗?
打开任意村民的交易界面,点击 Play Checkers(开始跳棋)。一个完整的棋盘会直接出现在那里——无需物品、无需指令、无需任何设置。你执红棋先行。
他们的实力如何?
村民的交易等级决定了其跳棋强度——每个等级的思考方式都截然不同,而不仅仅是更深:
| 村民等级 |
跳棋强度 |
| 新手 |
会走进强制被吃的陷阱 |
| 学徒 |
能看到陷阱,但抓不住反击机会 |
| 熟练工 |
能设下并发现“一换二”的机会 |
| 专家 |
理解残局——能击败对手 |
| 大师 |
能将胜势转化为胜利;不会失误 |
由于吃子是强制性的,跳棋是一场关于 击打(shots) 的游戏——即主动送出一个棋子,迫使对方吃子,从而赢得更多的回报。本模组的难度阶梯正是基于这一点构建的:村民能预见多深的强制连锁反应。新手根本看不出他的走法会让你获得一次跳跃吃子的机会;而熟练工则会为你设下一个这样的机会。
玩法说明
- 点击一枚棋子,然后点击其高亮显示的格子之一。
- 吃子是强制性的。 当存在跳跃吃子路径时,可以执行吃子的棋子会被描边;点击其他位置则会闪烁红色提示。
- 连跳 需一步步输入,下一步选项会高亮显示,而被牺牲的棋子会淡化处理。没有分支的连跳会自动播放完毕。右键可取消尚未完成的序列。
- 遵循完整的美国/英式跳棋规则——包括人们容易忘记的一条:兵在连跳过程中升变后停止移动,而不是继续以王棋的身份行动。
- 无合法移动者判负。 平局由 40 回合静止规则和三次重复局面规则判定。
- 可通过按钮 Resign(认输),或直接关闭棋盘。玩家移动超过 16 格远、村民死亡或断开连接均视为放弃游戏。
- 没有赌注,没有奖励——仅供娱乐(以及炫耀资本)。
技术细节
- 纯 Java 从头编写的跳棋引擎:采用 32 格压缩棋盘,将整个跳跃连串作为单个原子移动处理,使用 Zobrist 哈希算法——通过发布过的 perft 计数验证了深度为 8 的移动生成正确性。
- 搜索算法采用 negamax + alpha-beta 剪枝 + 迭代加深,并根据不同等级设定 吃子视界(capture horizon),决定需要解析多少待处理的强制连锁反应。
- 完全 服务器权威——服务器掌控游戏状态;客户端仅发送移动路径。
- 引擎在后台线程运行,因此服务器永远不会卡顿。
- 零素材资源:棋子圆盘通过程序化绘制,在任何棋盘尺寸下都保持清晰。
兼容性
与其他“村民游戏(Villager Games)”模组配合良好——交易界面上的按钮会堆叠排列而非重叠。
需要 Fabric API。客户端和服务器端均需安装该模组。
⛀ Villager Checkers
That Master-level librarian drives a hard bargain. Can they see a two-for-one shot coming?
Open any villager's trade screen and hit Play Checkers. A full board opens right there - no items, no commands, no setup. You play red and move first.
How strong are they?
A villager's trading level sets its checkers strength - and each level thinks in a genuinely different way, not just deeper:
| Villager level |
Checkers strength |
| Novice |
Walks into forced-capture traps |
| Apprentice |
Sees the traps, misses the shots |
| Journeyman |
Sets and finds 2-for-1 shots |
| Expert |
Understands the endgame - takes the opposition |
| Master |
Converts won endings; doesn't blunder |
Because capture is compulsory, checkers is a game of shots - offering a piece so the forced recapture wins more back. The ladder is built on exactly that: how far into a forced chain the villager can see. A Novice literally cannot see that its move hands you a jump. A Journeyman will set one for you.
How to play
- Click a piece, then click one of its highlighted squares.
- Capture is compulsory. When a jump is available the pieces that can take are outlined; clicking anything else flashes red.
- Multi-jumps are entered one hop at a time, with the next options highlighted and the doomed pieces faded. A chain with no branch plays itself. Right-click cancels a half-entered sequence.
- Full American/English draughts rules - including the one people forget: a man crowned mid-jump stops there instead of continuing as a king.
- Having no legal move loses. Draws come from the 40-move quiet rule and threefold repetition.
- Resign with the button, or just close the board. Walking more than 16 blocks away, the villager dying, or disconnecting abandons the game.
- No stakes, no rewards - just for fun (and bragging rights).
Under the hood
- A from-scratch pure-Java checkers engine: 32-square packed board, whole jump chains as single atomic moves, Zobrist hashing - move generation verified against published perft counts to depth 8.
- Search is negamax + alpha-beta + iterative deepening, with a per-level capture horizon that decides how much of a pending forced chain gets resolved.
- Fully server-authoritative - the server owns the game; the client only sends hop paths.
- The engine thinks on a background thread, so the server never stalls.
- Zero piece art: discs are drawn procedurally and stay crisp at any board size.
Compatibility
Plays nicely with the other Villager Games mods - the trade-screen buttons stack instead of overlapping.
Requires Fabric API. Client and server both need the mod.
评论 0
登录后参与评分
还没有评论,来抢沙发吧