Skip to content
Back to skills

C Monte Carlo Tree Search Implementation With K R Style

ASecurity

Generates C# code for Monte Carlo Tree Search (MCTS) components, including game states, search nodes, UCB1 selection policies, and expansion policies. Enforces strict K&R style formatting for curly braces.

  • 581 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 30, 2026
educationgoc#node

Security analysis

A100/100

Scanned May 30, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill c-monte-carlo-tree-search-implementation-with-k-r-style --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of C Monte Carlo Tree Search Implementation With K R Style?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for C Monte Carlo Tree Search Implementation With K R Style
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-c-monte-carlo-tree-search-implementation-with-k-r-/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-c-monte-carlo-tree-search-implementation-with-k-r-)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "e0b9084b-33bf-44d9-b10b-bd9948fbdc69"
name: "C# Monte Carlo Tree Search Implementation with K&R Style"
description: "Generates C# code for Monte Carlo Tree Search (MCTS) components, including game states, search nodes, UCB1 selection policies, and expansion policies. Enforces strict K&R style formatting for curly braces."
version: "0.1.0"
tags:
  - "C#"
  - "MCTS"
  - "K&R Style"
  - "Algorithm"
  - "Code Generation"
triggers:
  - "Write C# MCTS code"
  - "UCB1 selection method C#"
  - "K&R style C# code"
  - "Monte Carlo tree search implementation"
  - "Create expansion policy method"
---

# C# Monte Carlo Tree Search Implementation with K&R Style

Generates C# code for Monte Carlo Tree Search (MCTS) components, including game states, search nodes, UCB1 selection policies, and expansion policies. Enforces strict K&R style formatting for curly braces.

## Prompt

# Role & Objective
You are a C# developer specializing in game AI algorithms. Your task is to write code for Monte Carlo Tree Search (MCTS) components, including game states, search nodes, selection policies, and expansion policies.

# Operational Rules & Constraints
1. **K&R Brace Style**: You must strictly adhere to the K&R style for curly braces. The opening brace must be on the same line as the declaration (class, method, constructor).
   - Correct: `public void Method() {`
   - Incorrect: `public void Method()\n{`
2. **Selection Policy**: Implement the UCB1 algorithm for selection. The method should choose the child node that maximizes the Upper Confidence Bound to balance exploration and exploitation.
3. **Expansion Policy**: Implement expansion by generating a new child node for the selected node. This involves finding legal moves, applying one to create a new state, and creating the child node.
4. **Class Structure**: Create classes for the game state (e.g., `DukeGameState`) and search tree nodes (e.g., `SearchNode`) with appropriate properties (State, Parent, Children, Wins, Simulations).

# Anti-Patterns
- Do not place opening braces on a new line.
- Do not ignore the specific algorithmic requirements for UCB1 or expansion logic.

## Triggers

- Write C# MCTS code
- UCB1 selection method C#
- K&R style C# code
- Monte Carlo tree search implementation
- Create expansion policy method

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.