Skip to content

Branch and bound#22

Open
AdamJovine wants to merge 60 commits into
LAMDA-NeSy:mainfrom
AdamJovine:branch-and-bound
Open

Branch and bound#22
AdamJovine wants to merge 60 commits into
LAMDA-NeSy:mainfrom
AdamJovine:branch-and-bound

Conversation

@AdamJovine

Copy link
Copy Markdown

No description provided.

Adam Jovine and others added 30 commits June 9, 2026 14:26
- Add Groq LLM class to llms.py and wire into load_model.py
- Add hard constraint budget pre-filtering to nesy_agent
- Simplify TPCAgent to delegate fully to LLMDrivenAgent
- Update eval_tpc.py and pyproject.toml dependencies
- Exclude .env, zips, __MACOSX, and egg-info from git

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… venues in NesyAgent

- Add Ollama class to llms.py for local model inference (strips <think> tags)
- Wire ollama/ollama:<model> into init_llm with OLLAMA_BASE_URL/OLLAMA_MODEL env vars
- load_dotenv at startup in run_tpc.py so .env is picked up automatically
- Pre-filter restaurants and attractions in nesy_agent.py that cannot be reached
  before their closing time (using 20-min travel lower bound)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Points listen to a0ba55f which fixes stage2 dropping activity_position
timing-constrained restaurants from their meal slots and changes the
stage1/stage2 tie-breaking to prefer stage1.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
All listen development now tracks the china branch of LISTEN-active.
Includes timing-venue pinning fix, --rerun-failures flag, constraint
diagnostics, and inner-city budget improvements.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
_run_tournament_topk returns (winners, run_logs) but all call sites in
solve() were assigning the raw tuple, making transport_winners etc. a
2-tuple of lists instead of a list of dicts. The fallback loop would
AttributeError immediately on dict access.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tes/agent

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… budget, inner-city repair

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… B&B solver

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…erminus)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…e-by fix

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… slots

Brings in 3 commits from LISTEN-active china branch (a1deb3c → e45d291):
- Fix mixed-mode transport: go/back types parsed independently
- Port Pass 2 apostrophe fix into constraints.py
- Fix MISSING_REQUIRED_RESTAURANT: add meal slots + B&B skeleton sorting

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…SSING_REQUIRED_RESTAURANT

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… pools

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…get-trim repair

Picks up two fixes for ATTRACTION_COST constraint failures:
- _prefilter_by_budget now runs before type-pinning so free-only queries
  don't get paid attractions injected via required-type pins
- New budget-trim repair move in B&B for tight non-zero budgets
- full_snippet used for required-type detection in repair moves

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… guard

Picks up two more ATTRACTION_COST fixes:
- B&B repair now detects attraction_budget failures via label/full_snippet
  (abbreviated snippet was missing the <=N part, blocking budget-trim)
- Assembler guards Day 1 lunch against calling next_restaurant past window,
  preventing required restaurants from being permanently consumed

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… constraint

Merges LISTEN-active fixes:
- assembler.py: early-exit next_restaurant() when meal window already closed
- bnb_agent.py: GT pinning safety net, repair injection via computed diagnostics,
  updated _MISSING_RNAME_RE to match &, NL2SL fallback to GT constraints
- agent.py + bnb_agent.py: min_beds hotel filtering from new NL2SL field
- constraints.py: accommodation_numbed() evaluator function
- nl2sl.py: min_beds schema field, renderer, and few-shot example

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…hing

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rmalization + cuisine aliases + nl2sl fixes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… + misc fixes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adam Jovine and others added 30 commits June 18, 2026 01:21
- Bumps listen from 6dfbe0a to 3410603
- Includes: hotel pin sort fix, poi_timing apostrophe regex fix,
  word-set name matching, whitespace normalization, nl2sl caching,
  rank cache atomic writes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ming fix

Fixes chronological order violation where transport arrival time exceeds
next activity start time (~16/18 affected plans in BNB_21 run).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ol fix

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… fix eval score formula

listen → 32ec728:
- bnb_agent: _dedup_plan_attractions() strips repeated attractions from
  final plan output without changing BnB search paths (0 regressions).
- agent: _rows_for_pins() skips DB entries already seen to handle nl2sl
  splitting compound venue names into multiple pins for the same DB row.

eval_tpc.py: fix final_score formula — was using micro_comm twice (typo);
now correctly uses macro_comm for the second 0.1 weight.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- build_nl2sl_corpus.py: extracts (NL, GT) pairs from run directories or zips,
  reverse-maps DSL programs to JSON params, writes rank_cache/nl2sl_corpus.json
  for use with --nl2sl-corpus flag in run_tpc.py
- listen submodule: nl2sl dynamic few-shot + GT reverse-mapper + assembler fixes
  (Fix 8: Day 1 hotel reachability probe; Fix 9: restaurant canonical name)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…+ expand attraction pool (DAV fix)

Points listen to commit 8761432 which adds three DAV-improving assembler changes.
Diagnosed from LISTEN_v2 evaluation: plans averaged only 1.34 attractions/day
vs the 4.0/day target, yielding DAV=33%.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rough

cpsat DAV was near-zero (4.43%) because:
1. MTZ subtour elimination had wrong sign (+BigM → -BigM) making it trivial
2. CP-SAT selected attractions were being dropped by the routing MIP

Both bugs fixed; expected DAV improvement ~4% → ~25%.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… submodule

- eval_submission.py: local replication of TPC@IJCAI2026 weighted-sum evaluator
- show_failures.py, smart_merge.py, merge_rerun.py, fix_transport_price.py: analysis/repair utilities
- test_nl2sl_models.py: NL2SL model comparison harness
- nl2sl_corpus_v4y.json, v4_results.json: NL2SL training corpus and eval results
- AGENT_README.md, BNB_EXPERIMENT_LOG.md, diagrams.html: experiment documentation
- FULL1000_* / cpsat_*.log: full-1000 run logs for BNB and CP-SAT solvers
- failing_queries/: cached query JSONs for persistent failures (for debugging)
- .gitignore: exclude rank_cache/, .claude/, and LISTEN archive dirs
- listen: update submodule to include hotel proximity filter + pair-distance objective

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…kfast

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ration

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ntroid

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…r/agent/bnb fixes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tive terms

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fixes ATTRACTION_VISIT_TIME failures where spanning time constraints
(start <= T1 AND end >= T2) caused the routing MIP to drop venues.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
assembler: hotel-return budget probes now use metro mode (conservative
upper bound) instead of cheapest, preventing inner_city_budget overruns
caused by walk/metro threshold races near 2 km.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… formula fix

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Arrival (Day 1) and departure (Day D) now each get their own pool of
_N_TRAVEL_DAY_REST=8 attractions instead of sharing 4. Fixes structural
DAV ceilings caused by Day D always getting 0 attractions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…es + cpsat IC fixes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ttr types

Bumps LISTEN to ba14bbe which extends the CP-SAT IP to directly select
restaurants and attractions on arrival/departure travel days, fixing:
- Forced restaurants (required-name) on 2-day trips where n_full=0
- Required attraction types on 2-day trips
- Global at-most-once uniqueness now spans full days + travel days

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…erify mode

Add LISTEN_v3 run outputs (66 JSON files), challenging/easy UID lists,
run_remaining.py script, and updated log files for cpsat ceiling analysis.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ed int cast

- listen: assembler transit-day early hotel, cross-pool dedup, breakfast overhaul,
  colgen algorithm, nl2sl room_type rescue, cpsat meal window fix
- nesy_agent.py: cast hotel_sel["numbed"] to int to avoid type errors
- tpc_agent/utils.py: re-export shared UrbanTrip utilities for tpc_agent use

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant