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/Best-of-N (attempt-counted)

default/best_of_n_attempts

Best-of-N (attempt-counted)

Best-of-N that rotates the parent every N attempts — failed/invalid tries spend the budget too.

Test-time searchApache-2.0
Scaffold cardFiles and versions
best_of_n_attempts/__init__.py
18 lines · 842 BpythonDownload
"""Best-of-N-Attempts scaffold — the attempt-counted variant of Best-of-N.

Spends one unit of the N budget per attempt (valid or not), so the parent rotates every N
iterations. Differs from ``best_of_n`` only in the SelectionPolicy; the other five components are
reused from ``best_of_n``. See :mod:`galapagos.scaffolds.best_of_n` for the faithful (valid-counted)
original.
"""
from ..best_of_n.memory import BestOfNMemory
from ..best_of_n.population import BestOfNPopulation
from ..best_of_n.prompt_builder import BestOfNPromptBuilder
from ..best_of_n.proposer import BestOfNProposer
from .scaffold import BestOfNAttemptsScaffold
from .selection_policy import BestOfNAttemptsPolicy

__all__ = [
    "BestOfNAttemptsScaffold", "BestOfNAttemptsPolicy",
    "BestOfNPopulation", "BestOfNPromptBuilder", "BestOfNProposer", "BestOfNMemory",
]