Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize grid updates #40

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Commits on Jul 21, 2022

  1. Optimize grid updates

    instead of going through all cells to get their tile options, we keep a
    cache of options, and only modify cells that might have changed.
    
    Idea:
    We start from the picked cell, and we check its neighbours. For each
    neighbour (up, right, down, left), if the list of options has changed,
    we add its own neighbours to the list of cells to check. If it didn't
    change, we just skip its neighbours.
    
    It is even better than going through the old grid because it propagates
    changes until we come to a stable state. In the old way, we only check
    cells once, according to the state at t-1, which can miss some option
    reductions and lead to infeasibility.
    gverger committed Jul 21, 2022
    Configuration menu
    Copy the full SHA
    82242e7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    02a127a View commit details
    Browse the repository at this point in the history