Entropy guided
Entropy-guided tree search traversal.
EntropyGuidedSearch
EntropyGuidedSearch(
tree: ConfigurationTree,
target: dict[int, LocationAddress],
goal: GoalPredicate,
params: SearchParams = SearchParams(),
max_depth: int | None = None,
max_expansions: int | None = None,
on_step: (
Callable[[str, ConfigurationNode, StepInfo], None]
| None
) = None,
)
Entropy-guided depth-first search with reversion and sequential fallback.
Encapsulates the internal state of the search so that helper methods can access shared context (tree, target, params, etc.) without requiring long parameter lists.
Source code in .venv/lib/python3.12/site-packages/bloqade/lanes/search/traversal/entropy_guided.py
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 | |
run
run(generator: MoveGenerator) -> SearchResult
Execute the entropy-guided search and return the result.
Source code in .venv/lib/python3.12/site-packages/bloqade/lanes/search/traversal/entropy_guided.py
476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 | |
EntropyGuidedTraversal
dataclass
EntropyGuidedTraversal(
target: dict[int, LocationAddress],
params: SearchParams = SearchParams(),
on_step: (
Callable[[str, ConfigurationNode, StepInfo], None]
| None
) = None,
)
Bases: TraversalStrategyABC
Traversal strategy adapter for entropy-guided search.
search
search(
*,
tree: ConfigurationTree,
generator: MoveGenerator,
goal: GoalPredicate,
max_expansions: int | None = None,
max_depth: int | None = None
) -> SearchResult
Execute search over the tree using the supplied generator.
Source code in .venv/lib/python3.12/site-packages/bloqade/lanes/search/traversal/entropy_guided.py
581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 | |
entropy_guided_search
entropy_guided_search(
tree: ConfigurationTree,
target: dict[int, LocationAddress],
goal: GoalPredicate,
params: SearchParams = SearchParams(),
max_depth: int | None = None,
max_expansions: int | None = None,
on_step: (
Callable[[str, ConfigurationNode, StepInfo], None]
| None
) = None,
) -> SearchResult
Entropy-guided depth-first search with reversion and sequential fallback.
Thin wrapper around EntropyGuidedSearch for backward compatibility.
Also takes target directly (in addition to goal) because scoring needs
the raw target mapping.
Source code in .venv/lib/python3.12/site-packages/bloqade/lanes/search/traversal/entropy_guided.py
605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 | |