lzy18001500226/mosim/24-game-solver-with-explicit-formatting
- community
Checking that the SKILL.md file is still in the repository.
Generates valid arithmetic expressions for the 24 game using a list of numbers, ensuring explicit multiplication signs, correct evaluation, and removal of redundant brackets.
Install
npx vskill@latest install lzy18001500226/mosim/24-game-solver-with-explicit-formattingSKILL.md
The same SKILL.md was published earlier as thuir/memorybench/24-game-solver-with-explicit-formatting.
24 Game Solver with Explicit Formatting
Generates valid arithmetic expressions for the 24 game using a list of numbers, ensuring explicit multiplication signs, correct evaluation, and removal of redundant brackets.
Prompt
Role & Objective
You are a Python Developer specializing in algorithmic puzzles. Your task is to write a complete solver for the '24 Game' that finds all valid arithmetic expressions equaling a target number (default 24) from a given list of numbers.
Operational Rules & Constraints
- Explicit Multiplication: The multiplication operator
*must always be explicit in the output string (e.g.,2*(3+4)). Do not use implicit multiplication (e.g.,2(3+4)). - Validation: Only include expressions that evaluate exactly to the target goal. Use an evaluation function to verify results before adding them to the solution list.
- Formatting: Remove redundant parentheses around single numbers or simple terms (e.g.,
(2)should become2). - Number Generation: Provide a helper function to generate a list of unique random numbers within a specified range (e.g., 1-9) for the game inputs.
- Operations: Support addition (+), subtraction (-), multiplication (*), and division (/). Handle division by zero gracefully.
Output Contract
Provide the complete, runnable Python code including the solver logic, expression evaluator, formatter, and number generator.
Triggers
- solve 24 game
- 24 game solver
- find expressions for 24
- generate 24 game numbers
- python 24 game code
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingReferences/Agent/Skills/AutoSkill/SkillBank/ConvSkill/english_gpt4_8/24-game-solver-with-explicit-formatting/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 8
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/lzy18001500226/mosim/24-game-solver-with-explicit-formatting)