xiaohongshu
xiaohongshu
innovation-game-miner
This skill should be used when developing, optimizing, testing, or submitting algorithms for The Innovation Game challenges (3-SAT, CVRP, Knapsack). Use it for algorithm development, performance optimization, local testing, dry-run validation, or submission to earn TIG tokens through improved com...
Full skill instructions
The Innovation Game (TIG) is a platform that monetizes algorithm development by rewarding TIG tokens for high-performing algorithms. This skill provides comprehensive support for competitive algorithm development across three challenges: Boolean Satisfiability (3-SAT), Capacitated Vehicle Routing (CVRP), and Knapsack problems.
Use this skill to develop algorithms, test performance locally, optimize for competitive benchmarking, validate submissions, and earn TIG tokens through algorithm royalties when benchmarkers adopt your solutions.
This skill provides three major workflows:
Use this decision tree to determine which workflow to follow:
Are you starting a new TIG mining project?
├─ YES → Follow "Algorithm Development Workflow"
│
└─ NO → What do you want to do?
├─ Test an algorithm locally → "Testing Workflow"
├─ Submit an algorithm to TIG → "Submission Workflow"
└─ Optimize an existing algorithm → "Algorithm Optimization Workflow"
# Clone the official challenges repository
git clone https://github.com/the-innovation-game/challenges.git
cd challenges
# Install dependencies
pip install numpy==1.25.0
Each challenge follows this structure:
c001_satisfiability/
├── challenge.py # Difficulty and Challenge dataclasses
├── algorithms/
│ ├── default.py # Baseline algorithm
│ └── <your_algo>.py # Your algorithm
└── README.md # Challenge description
Load challenge-specific references to understand problem details:
references/challenge_3sat.md - 3-SAT strategies and optimization tipsreferences/challenge_cvrp.md - CVRP algorithms and approachesreferences/challenge_knapsack.md - Knapsack techniquesCreate a new algorithm by copying and modifying an existing one:
# Copy default algorithm as starting point
cp c001_satisfiability/algorithms/default.py c001_satisfiability/algorithms/my_solver.py
Algorithm requirements:
def solveChallenge(challenge: Challenge, logIntermediateInteger=int) -> Solution:
"""
Required function signature for all TIG algorithms.
Args:
challenge: Instance of Challenge with seed, difficulty, and problem data
logIntermediateInteger: Function to log intermediate values (builds signature)
Returns:
Solution in format specified by challenge (np.ndarray, List[List[int]], etc.)
"""
# Your algorithm implementation here
pass
Critical constraints:
logIntermediateInteger() regularlyExample: 3-SAT WalkSAT Algorithm
from c001_satisfiability.challenge import Challenge
import numpy as np
def solveChallenge(challenge: Challenge, logIntermediateInteger=int) -> np.ndarray:
np.random.seed(challenge.seed)
# Random initial assignment
assignment = np.random.rand(challenge.difficulty.num_variables) < 0.5
max_steps = 10000
noise_prob = 0.3
for step in range(max_steps):
# Check if solved
if challenge.verifySolution(assignment):
return assignment
# Log intermediate value for signature
if step % 100 == 0:
logIntermediateInteger(int(np.sum(assignment) * 1e6))
# Find unsatisfied clauses
v = assignment[np.abs(challenge.clauses) - 1]
np.logical_not(v, where=challenge.clauses < 0, out=v)
satisfied = np.any(v, axis=1)
unsatisfied_clauses = np.where(~satisfied)[0]
if len(unsatisfied_clauses) == 0:
return assignment
# Pick random unsatisfied clause
clause_idx = np.random.choice(unsatisfied_clauses)
clause = challenge.clauses[clause_idx]
# Flip variable (with noise)
if np.random.rand() < noise_prob:
var = np.abs(np.random.choice(clause)) - 1 # Random
else:
var = np.abs(clause[0]) - 1 # Greedy (simplified)
assignment[var] = not assignment[var]
return assignment # Return best found (may not satisfy)
Refer to optimization strategies: Load references/optimization_strategies.md for cross-challenge performance techniques including time management, memory optimization, vectorization, and competitive analysis.
Use the provided testing script to validate algorithm correctness and performance:
# Test 3-SAT solver
python scripts/test_algorithm.py c001_satisfiability my_solver \
--difficulty '{"num_variables": 50, "clauses_to_variables_percent": 425}' \
--seeds 100
# Test CVRP router
python scripts/test_algorithm.py c002_vehicle_routing my_router \
--difficulty '{"num_nodes": 20, "percent_better_than_baseline": 15}' \
--seeds 50
# Test Knapsack solver
python scripts/test_algorithm.py c003_knapsack my_knapsack \
--difficulty '{"num_items": 100, "percent_better_than_expected_value": 10}' \
--seeds 100 \
--verbose
Script output:
Success criteria:
Test multiple difficulty levels to ensure robustness:
# Example: Comprehensive 3-SAT testing
difficulties = [
{"num_variables": 30, "clauses_to_variables_percent": 350}, # Easy
{"num_variables": 50, "clauses_to_variables_percent": 425}, # Medium
{"num_variables": 100, "clauses_to_variables_percent": 430}, # Hard
{"num_variables": 150, "clauses_to_variables_percent": 425}, # Scale test
]
for diff in difficulties:
print(f"\nTesting difficulty: {diff}")
# Run test_algorithm.py script for each difficulty
Pro tip: Most benchmarkers use default difficulty settings. Optimize for medium difficulty first, then scale to handle hard instances.
# Check if submissions are enabled and cost
python scripts/check_submission_cost.py
Output provides:
Important: Submissions only allowed when round is active (Mondays 00:00 UTC start new rounds)
# Check available balance
python scripts/check_balance.py <your-api-key>
How to get an API key: Use the Simple Benchmarker on Google Colab
If insufficient balance: Earn tokens by running the Simple Benchmarker to test algorithms and submit high-performing benchmarks.
Always test submission acceptance first without spending tokens:
# Dry run (FREE - no tokens spent)
python scripts/submit_algorithm.py c001_satisfiability my_solver <api-key> --dry-run
Dry-run validates:
If dry-run fails: Fix errors and retry until it passes.
Once dry-run succeeds and you have sufficient balance:
# Production submission (SPENDS TIG TOKENS)
python scripts/submit_algorithm.py c001_satisfiability my_solver <api-key> \
--accept-terms \
--git-user "your-github-username" \
--git-email "[email protected]" \
--algorithm-md "path/to/description.md"
What happens after submission:
Licensing note: All submissions must use Open Source licenses. If deriving from existing code, respect original license terms.
Compare your algorithm against the default baseline:
# Benchmark against default
from c001_satisfiability.algorithms.default import solveChallenge as default_solver
from c001_satisfiability.algorithms.my_solver import solveChallenge as my_solver
from c001_satisfiability.challenge import Challenge, Difficulty
import time
difficulty = Difficulty(num_variables=50, clauses_to_variables_percent=425)
wins = 0
total = 100
for seed in range(total):
challenge = Challenge.generateInstance(seed, difficulty)
# Test default
start = time.time()
default_result = default_solver(challenge, lambda x: None)
default_time = time.time() - start
default_solved = challenge.verifySolution(default_result)
# Test yours
start = time.time()
my_result = my_solver(challenge, lambda x: None)
my_time = time.time() - start
my_solved = challenge.verifySolution(my_result)
if my_solved and not default_solved:
wins += 1
print(f"Win rate: {wins}/{total} ({wins/total*100:.1f}%)")
Target win rate: 80%+ to be competitive
Load detailed optimization guidance from references/optimization_strategies.md, which covers:
Key optimization checklist:
logIntermediateInteger() every 10-100 iterationsProblem: Determine if Boolean formula with 3 literals per clause can be satisfied
Key insights:
Refer to: references/challenge_3sat.md for:
Problem: Route vehicles to minimize distance while respecting capacity constraints
Key insights:
Refer to: references/challenge_cvrp.md for:
Problem: Select items to maximize value within weight constraint
Key insights:
Refer to: references/challenge_knapsack.md for:
For direct API usage or custom tooling, refer to references/api_reference.md, which documents:
Earning TIG Tokens:
Spending TIG Tokens:
Royalty System:
Round Structure:
algorithm_submissions_killswitch before submittingBefore submitting any algorithm, verify:
logIntermediateInteger() regularlyThis skill includes comprehensive resources:
test_algorithm.py - Local testing with configurable difficulty and seedscheck_submission_cost.py - Check round status and submission costscheck_balance.py - Check TIG token balance and earningssubmit_algorithm.py - Submit algorithms with dry-run and production modeschallenge_3sat.md - 3-SAT problem details, strategies, and optimization tipschallenge_cvrp.md - CVRP algorithms, techniques, and validation checklistchallenge_knapsack.md - Knapsack approaches and memory optimizationapi_reference.md - TIG API endpoints, authentication, and token economicsoptimization_strategies.md - Cross-challenge optimization techniquesComplete workflow for a new TIG miner:
# 1. Clone and setup
git clone https://github.com/the-innovation-game/challenges.git
cd challenges
pip install numpy==1.25.0
# 2. Create algorithm
cp c001_satisfiability/algorithms/default.py c001_satisfiability/algorithms/my_solver.py
# (Edit my_solver.py with your improvements)
# 3. Test locally
python scripts/test_algorithm.py c001_satisfiability my_solver \
--difficulty '{"num_variables": 50, "clauses_to_variables_percent": 425}' \
--seeds 100
# 4. Check submission status
python scripts/check_submission_cost.py
python scripts/check_balance.py <api-key>
# 5. Dry-run validation
python scripts/submit_algorithm.py c001_satisfiability my_solver <api-key> --dry-run
# 6. Submit for real
python scripts/submit_algorithm.py c001_satisfiability my_solver <api-key> --accept-terms
Congratulations! You're now mining competitively on The Innovation Game. Monitor your algorithm's adoption and royalties through the API or TIG website.
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience