exercism / exercism/problem-specifications

Exercise ideas: Game trees, Comma-Separated Trees, Collatz Trees

未关闭
#1,388 10 条评论 1 个 reaction 已指派 1 人 已被 @sshine 认领 在 GitHub 查看
new exercise idea
主要语言
Ruby
星标
358
派生
563
平均合并
18 小时 41 分钟
30 天内合并 PR
2

描述

[Game trees](https://en.wikipedia.org/wiki/Game_tree) are trees that describe the possible choices in a turn-based game. The leaves are final states where either player has won, and each step up the tree describe the turn before where the other player (alternating at each level in the tree) has a number of choices corresponding to one sub-tree each.

An exercise would consist of describing a game between two persons (Alice and Bob?) in a story-like fashion, a (possibly illustrated?) description of game trees, and a task to 1) build the game tree between Alice and Bob for the given game, and 2) given a game tree, pick the best move.

The exercise can be unit-tested for small game trees and property-tested for larger game trees.

As for the specific game, popular choices are [Nim](https://en.wikipedia.org/wiki/Nim) and [Tic-tac-toe](https://en.wikipedia.org/wiki/Tic-tac-toe). We might also pick something else.

**Motivation:** In my opinion, the Haskell track lacks tree-based exercises. (Ping @petertseng)

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。