This repository contains the code for PatternBoost, an algorithm that alternates between local search and transformer-based global pattern learning to find new constructions in mathematics, particularly in extremal combinatorics.
PatternBoost consists of two iterative phases:
- Local phase: A classical search algorithm optimizes mathematical constructions.
- Global phase: A transformer neural network is trained on the best constructions from the local phase, generating new seeds for the next iteration.
The project’s goal is to provide mathematicians with an accessible tool that balances simplicity and performance without requiring deep machine learning expertise.
- Python 3.10+
- Julia 1.8+
- Clone the repository:
git clone https://github.com/zawagner22/transformers_math_experiments.git
- Navigate to the directory and install the necessary libraries for python and julia
- Pick a problem from
search_fc.jl
. You can create new problems based on the examples provided. - Configure your parameters in
fc_loop.py
. - Run PatternBoost:
python fc_loop.py
Feel free to explore other problems or propose extensions to the PatternBoost algorithm!