A comprehensive development environment for the NeurIPS 2025 Google Code Golf Championship. This repository provides tools, utilities, and analysis notebooks to help participants develop, test, and optimize their solutions.
This project showcases Human-AI Collaborative Programming, where development tasks are intelligently distributed between human creativity and AI assistance:
- Human-AI Collaboration: Strategic partnership between human developer and Claude AI
- AI-Assisted Development: Leveraging AI for code generation, optimization, and documentation
- Interactive Programming: Continuous feedback loop between human insight and AI capabilities
- Python 3.8+: Primary programming language with modern features
- Jupyter Notebooks: Interactive development and analysis environment
- NumPy & Pandas: Data manipulation and numerical computing
- Cross-Platform Support: Linux, macOS, and Windows compatibility
- VS Code: Optimized development environment
- Black & Flake8: Code formatting and linting
- Type Hints: Enhanced code reliability with mypy
- Bash Scripting: Automation and environment management
- Code Golf Optimization: Character counting and minimization tools
- Automated Testing: Solution validation and performance metrics
- Environment Automation: One-command setup and configuration
- Bilingual Documentation: English and Portuguese support
Author: Mauro Risonho de Paula AssumpΓ§Γ£o License: MIT License Development Model: Human-AI Collaborative Programming
# Clone and setup environment
git clone https://github.com/neurips-2025-code-golf/championship.git
cd championship
./setup.py # or ./setup.sh for bash users# After setup, use the interactive quick start
./quick_start.pyThis will give you an interactive menu to:
- π Start Jupyter Notebook for analysis
- π Run demo workflow
- π Explore problem structure
- π§ͺ Test solutions
- π Count characters in solutions
- π View documentation
- And more!
- Python 3.8+ (tested with 3.8, 3.9, 3.10, 3.11, 3.12, 3.13)
- Git for version control
- Internet connection for downloading dependencies
- Kaggle account for competition participation
The setup scripts will automatically:
- Create and configure a Python virtual environment
- Install all required dependencies
- Set up Jupyter notebooks with project kernel
- Configure project structure
- Verify Kaggle API (if configured)
- Create activation scripts
Choose your preferred setup method:
Python Setup (Cross-platform):
./setup.pyBash Setup (Linux/macOS):
./setup.shNeurIPS-2025-Google-Code-Golf-Championship/
βββ π README.md # This file
βββ π setup.py # Cross-platform setup script
βββ π setup.sh # Bash setup script
βββ π quick_start.py # Interactive quick start
βββ βοΈ activate.sh # Environment activation
βββ π requirements.txt # Python dependencies
βββ π SETUP.md # Detailed setup guide
βββ π― KAGGLE_SETUP.md # Kaggle configuration
βββ π REFACTORING_SUMMARY.md # Project documentation
βββ π problems/ # Competition problems
β βββ problem_01/
β β βββ description.md
β β βββ solutions/
β β β βββ solution.py
β β βββ test_cases/
β βββ problem_XX/
βββ π οΈ utils/ # Utility tools
β βββ count_chars.py # Character counting
β βββ test_solution.py # Solution testing
β βββ create_problem.py # Problem creation
βββ π¬ scripts/ # Automation scripts
β βββ demo_workflow.py # Demo workflow
βββ π notebooks/ # Analysis notebooks
β βββ analysis_notebook_EN.ipynb # English analysis
β βββ analysis_notebook_PT_BR.ipynb # Portuguese analysis
βββ π docs/ # Documentation
β βββ code_golf_guide.md # Code golf strategies
βββ π¦ submissions/ # Competition submissions
βββ π logs/ # Log files
Count characters in your solutions to optimize for code golf:
python utils/count_chars.py path/to/solution.pyFeatures:
- Multiple counting methods (total, no-whitespace, minimal)
- Detailed analysis with breakdown
- Code golf optimization suggestions
Test your solutions locally before submission:
python utils/test_solution.py path/to/solution.pyFeatures:
- Automated test case execution
- Output format validation
- Performance timing
- Error reporting
Create new problem structures:
python utils/create_problem.py problem_name "Problem Description"- Code golf strategy analysis
- Character optimization techniques
- Statistical analysis of solutions
- Performance benchmarking
- AnΓ‘lise de estratΓ©gias de code golf
- TΓ©cnicas de otimizaΓ§Γ£o de caracteres
- AnΓ‘lise estatΓstica de soluΓ§Γ΅es
- Benchmarking de performance
# Initial setup
./setup.py
# Activate environment
source activate.sh# Start interactive environment
./quick_start.py
# Or manually start Jupyter
jupyter notebook# Create new problem structure
python utils/create_problem.py problem_05 "New Problem"
# Develop solution in problems/problem_05/solutions/
# Test solution
python utils/test_solution.py problems/problem_05/solutions/solution.py# Count characters for optimization
python utils/count_chars.py problems/problem_05/solutions/solution.py
# Use analysis notebooks for optimization strategies
jupyter notebook notebooks/analysis_notebook_EN.ipynb# Prepare submission
cp problems/problem_05/solutions/solution.py submissions/
# Submit via Kaggle (see KAGGLE_SETUP.md)
kaggle competitions submit -c competition-name -f submissions/solution.py -m "Optimized solution"- Variable Names: Use single letters (
a,b,c) - Compact Syntax: Prefer
x+=1overx=x+1 - List Comprehensions: More compact than loops
- Built-in Functions: Leverage Python's rich standard library
- Lambda Functions: For short, inline operations
- String Operations: Use format strings and join operations
- Mathematical Shortcuts: Use
//,%,**operators efficiently
# Instead of multiple lines
if condition:
result = value1
else:
result = value2
# Use ternary operator
result = value1 if condition else value2
# Instead of range loops
for i in range(len(items)):
process(items[i])
# Use enumerate or direct iteration
for i, item in enumerate(items):
process(item)See docs/code_golf_guide.md for comprehensive strategies.
- Create account at kaggle.com
- Go to Account β API β Create New Token
- Download
kaggle.jsonto~/.kaggle/ - Set permissions:
chmod 600 ~/.kaggle/kaggle.json
See KAGGLE_SETUP.md for detailed instructions.
# List competitions
kaggle competitions list
# Download data
kaggle competitions download -c competition-name
# Submit solution
kaggle competitions submit -c competition-name -f solution.py -m "Message"
# Check leaderboard
kaggle competitions leaderboard -c competition-name# Test specific solution
python utils/test_solution.py problems/problem_01/solutions/solution.py
# Run demo workflow
python scripts/demo_workflow.py
# Test all solutions (if implemented)
pytest tests/ # When test suite is addedTest cases should follow this structure:
problems/problem_XX/test_cases/
βββ input_01.txt
βββ expected_01.txt
βββ input_02.txt
βββ expected_02.txt
βββ ...
The character counter provides multiple metrics:
- Total characters: Including all whitespace and comments
- No-whitespace: Excluding spaces, tabs, and newlines
- Minimal: Most compressed representation
- Effective: Counting only essential characters
Solutions are timed during testing to identify performance bottlenecks.
# Create problem structure
python utils/create_problem.py problem_name "Description"
# Add test cases to problems/problem_name/test_cases/
# Develop reference solution in problems/problem_name/solutions/- Follow PEP 8 for readable code
- Use
blackfor formatting:black file.py - Use
flake8for linting:flake8 file.py - For golf solutions, optimize for character count over readability
- docs/SETUP.md - Detailed environment setup
- docs/KAGGLE_SETUP.md - Kaggle API configuration
- docs/code_golf_guide.md - Code golf strategies
- docs/HUMAN_AI_COLLABORATION.md - Human-AI collaboration methodology
- docs/BADGE_COLLECTION.md - Complete badge system documentation
- docs/REFACTORING.md - Technical refactoring documentation
Environment not activated:
source activate.sh # Always activate before workingImport errors:
pip install -r requirements.txt # Reinstall dependenciesKaggle API errors:
# Check credentials
ls ~/.kaggle/kaggle.json
# Reconfigure if needed - see KAGGLE_SETUP.mdJupyter kernel issues:
# Reinstall kernel
python -m ipykernel install --user --name=neurips-code-golf --display-name="NeurIPS Code Golf"- Interactive Help: Run
./quick_start.pyand select option 9 - Documentation: Check files in
docs/directory - Issues: Report bugs on GitHub repository
- Community: Join competition discussions on Kaggle
This project is licensed under the MIT License.
MIT License
Copyright (c) 2025 Mauro Risonho de Paula AssumpΓ§Γ£o
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- NeurIPS 2025 - For hosting the championship
- Google - For sponsoring the code golf competition
- Kaggle - For providing the competition platform
- Python Community - For the amazing tools and libraries
This project exemplifies modern Human-AI Collaborative Programming, demonstrating how human creativity and AI capabilities can work together to create superior software solutions:
- Strategic Architecture: Overall project design and structural decisions
- Domain Knowledge: Code golf expertise and competition strategy
- Creative Problem Solving: Innovative approaches to optimization challenges
- User Experience Design: Intuitive interfaces and workflow design
- Quality Assurance: Testing, validation, and performance optimization
- Code Generation: Automated creation of boilerplate and utility functions
- Documentation: Comprehensive guides, comments, and API documentation
- Translation: Portuguese-to-English content localization
- Optimization: Code golf techniques and character minimization strategies
- Environment Setup: Cross-platform automation and configuration scripts
- Human defines requirements and strategic goals
- AI generates initial implementation and documentation
- Human reviews, refines, and provides domain expertise
- AI iterates based on feedback and optimizes solutions
- Human validates final output and ensures quality standards
- 50+ files created/enhanced through Human-AI partnership
- Complete bilingual documentation (English + Portuguese)
- Cross-platform automation with professional-grade setup scripts
- Comprehensive testing framework with optimization tools
- Professional-grade project structure ready for competition use
- β‘ Speed: Faster development through AI assistance
- π¨ Quality: Human oversight ensures excellence
- π Consistency: AI maintains uniform documentation and coding standards
- π Accessibility: Bilingual support and comprehensive guides
- π Innovation: Combined human creativity with AI efficiency
This project demonstrates the future of software development - where human intelligence and artificial intelligence work in harmony to achieve results neither could accomplish alone.
- NeurIPS 2025 - Conference homepage
- Kaggle Competition - Competition platform
- GitHub Repository - Source code
- Python.org - Python documentation
Ready to golf some code? ποΈββοΈ
Start with ./quick_start.py and let the interactive menu guide you through your first steps!
Good luck in the championship! π