galapagos
DocsHubLeaderboardPlaygroundNews
galapagos

six blocks · any task ·
better solutions emerge.

Platform

  • Hub
  • Leaderboard
  • Playground

Resources

  • Docs
  • API reference
  • Card spec

Community

  • GitHub
  • Contribute

Updates

  • News
  • Releases

© 2026 Galapagos. Licensed under Apache-2.0.

Build your own scaffold.

Hub/Scaffolds/default/Beam Search

default/beam_search

Maintain a fixed-width beam of promising programs; expand one per step, prune by fitness+diversity.

Test-time searchApache-2.0
Scaffold cardFiles and versions
beam_search/proposer.py
17 lines · 939 BpythonDownload
"""Beam Search Proposer component — the SEARCH/REPLACE diff (with full-rewrite fallback) operator."""
from __future__ import annotations

from ...components.proposer import DiffProposer


class BeamSearchProposer(DiffProposer):
    """One LLM call -> a SEARCH/REPLACE diff applied to the parent (SkyDiscover's solution generator),
    with mandatory no-op detection. Expanding a beam member produces one child.

    beam_search runs the DEFAULT ``DiscoveryController`` (it registers no custom controller), whose
    diff-mode ``_parse_llm_response`` applies diffs by WHOLE-LINE matching (``apply_diff``) and is
    STRICT: a response with no SEARCH/REPLACE block, or a block that does not match the parent, is a
    parse error → retried/discarded, never a full rewrite and never an evaluated parent-duplicate. So
    whole-line is on but the full-rewrite fallback is OFF — identical to topk/best_of_n."""

    diff_wholeline = True