In the game Go, Benson's algorithm (named after David B. Benson) can be used to determine the stones which are safe from capture no matter how many turns in a row the opposing player gets, i.e. unconditionally alive.
Without loss of generality, we describe Benson's algorithm for the Black player.
Let X be the set of all Black chains and R be the set of all Black-enclosed regions of X. Then Benson's algorithm requires iteratively applying the following two steps until neither is able to remove any more chains or regions:
The final set X is the set of all unconditionally alive Black chains.