Skip to content

Try different search strategy in AoC 22 Day 16 #3

@iglesias

Description

@iglesias

aoc_22_day_16_valves.cpp

The team_search is using a state with two minute marks and valve positions, and so the search moves the two players simultaneously. Even though the two players use their own minute, my intuition expects that states will contain players with similar minutes, since the state expansion makes a move for all two players.

A different search strategy consists in searching for each player iteratively. So, I would start with the, say, 26 minutes of player 1 and then, when the search has finished for a single player, it would continue with the next player starting her or his own minute count. Of course valves chosen by a previous player cannot be reopened for the next one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions