Skip to content

Instantly share code, notes, and snippets.

View alcides's full-sized avatar

Alcides Fonseca alcides

View GitHub Profile
@alcides
alcides / README.md
Last active November 4, 2026 13:04
Aeon 32-item knapsack with inductive stdlib List: 41 synthesizer IDs, hard 10-second timeout; single-step tactics excluded

Aeon: 32-item 0–1 knapsack with inductive stdlib lists

Run on 2026-11-04T13:04:08Z, using Aeon 41a88a70 and Python 3.13.15.

Attempted 36 canonical backend/model IDs plus 5 aliases (41 runs), sequentially, with a hard 10-second wall-clock limit per run. Excluded all 12 single-step tactics as requested. The multi-step tactics search is included.

No independently verified complete solution was reported within the 10-second deadline. This is a measured timeout/interface result, not a claim that these algorithms cannot solve knapsack.

There is no synthesized best_solution.ae for this run. reference_solution.ae is clearly labeled as an independently computed reference, not a synthesis result.

@alcides
alcides / aeon-gp-timing-stack-vs-ge.md
Created September 17, 2026 16:55
Aeon CBGP timing: gp_stack vs ge (eval vs wall clock)

Aeon timing: stack GGGP vs grammatical evolution

Problem: centimeters-to-meters
Settings: population 100, evaluation cap 1000, gene length 128, wall budget 20s, lexicase, early stop
Measured: wall clock for one synthesis run; evaluation = genotype→AST mapping + fitness over train cases

Phase gp_stack share ge share
Wall clock 48.1s 100% 16.6s 100%
Evaluation (map + fitness) 47.8s 99.5% 14.6s 88.0%
@alcides
alcides / centimeters-to-meters.bnf
Created September 17, 2026 13:18
Aeon synthesis grammar (BNF) for CBGP centimeters-to-meters benchmark
; centimeters-to-meters — Aeon/GeneticEngine synthesis grammar
; Hole type: (x: Int) → Tuple
; Start symbol: <Tuple>
<Tuple> ::= app_pair(<Int>, <Int>)
| app(<Int → Tuple>, <Int>)
<Int> ::= x
| lit0
| lit100
@alcides
alcides / experiment_runner.py
Last active August 17, 2026 12:00
GeneticEngine mathematical programming benchmarks and 30x30-minute experiment tooling
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "matplotlib>=3.8",
# "numpy>=2.0",
# "pandas>=2.2",
# ]
# ///
"""Entry-point metadata for running the experiment scripts with uv."""
NodeName=localhost Name=gpu type=a30 File=/dev/nvidia[0-1]
NodeName=localhost Name=mps count=200 File=/dev/nvidia[0-1]
@alcides
alcides / flatten.py
Created July 4, 2023 20:34
Script to (recursively) literally include all \input or \include, and put all files in the root folder (for submission in journals with an awful UI system)
"""
This script flattens the structure of this project in the output folder.
"""
import os
import re
import sys
import shutil
from datetime import date
from pathlib import Path
@alcides
alcides / Readme.md
Last active February 28, 2023 03:52
MyFirstCompiler

My First Compiler

Overview

This project shows an example of a compiler pipeline.

The frontend is responsible for parsing the input file (example.lang) and returning an AST. The AST is designed using an OO approach, with two main types (Statement and Expression), and multiple options for each. A program is a list of statements. There is one semantic validation: we are detecting if variables are used before they are defined. If so, we raise an exception.

@alcides
alcides / stats.py
Last active October 18, 2022 08:23
Solution to Timothy Gowers's Daughter Homework
# Puzzle from: https://twitter.com/wtgowers/status/1581667648592826369?s=12&t=5CR5L4TsH2MJWDJwBO8Wmw
import z3
s = z3.Solver()
a, b, c, d, e = z3.Ints("a b c d e")
# order
s.add( a <= c )
s.add( b <= c )
s.add( c <= d )
• [alcides@franklin:~/Code/srbench] (Competition2022) $ ~/bin/act
[CI/check] 🚀 Start image=ghcr.io/catthehacker/ubuntu:act-latest
[CI/check] 🐳 docker pull image=ghcr.io/catthehacker/ubuntu:act-latest platform= username= forcePull=false
[CI/check] 🐳 docker create image=ghcr.io/catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[CI/check] 🐳 docker run image=ghcr.io/catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[CI/check] 🐳 docker exec cmd=[mkdir -m 0777 -p /var/run/act] user=root workdir=
[CI/check] 🐳 docker cp src=/home/alcides/Code/srbench/. dst=/home/alcides/Code/srbench
[CI/check] 🐳 docker exec cmd=[mkdir -p /home/alcides/Code/srbench] user= workdir=
[CI/check] ⭐ Run Checkout code
[CI/check] ✅ Success - Checkout code
@alcides
alcides / Proofs.hs
Created March 31, 2022 09:31
Lean vs LiquidHaskell for proofs about Haskell programs
import Language.Haskell.Liquid.ProofCombinators
{-@ reflect map1 @-}
map1 :: (Int -> Int) -> [Int] -> [Int]
map1 f [] = []
map1 f (x:xs) = (f x):(map1 f xs)
{-@ reflect length1 @-}
length1 :: [Int] -> Int