Advent of Code 2019 - Day 21

Nice one @sasajuric !

I went the other way and tried to find a generic solution that jumps whenever possible and required. Don’t know if it would cover all the possible land shapes, but it worked well for me, though a bit longer.

    # if A is hole set T to true
    NOT A T
    # set J to true if A was hole
    OR T J
    # same for B
    NOT B T
    OR T J
    # same for C
    NOT C T
    OR T J
    # Now J is true if there is a hole incoming in either A, B or C
    # We will jump only if we can land on D
    AND D J
    # Now J is true if hole incoming and D is ground.
    # We must ensure that we can also jump from D to H
    #                     or move from D to E.
    # First we set T to false if J is true
    NOT J T
    # Then we will check if H is ground or E is ground 
    # and set T to true in either case
    OR H T
    OR E T
    # If J was false, and T was set to true, T is still true, 
    # meaning that H or E are ground, although they may not be ground.
    # But still, we will only jump if a hole is comming, requiring 
    # that bot J and T are true, and set J to true if so.
    AND T J
    RUN