Fill+Algorithms


 * Home * Board Representation * Bitboards * Fill Algorithms**
 * [[image:Plane_Filling_II.jpg width="330" height="289" link="http://www.mcescher.com/Gallery/recogn-bmp/LW422.jpg"]] ||~  || **Fill algorithms** perform the union of a set with their consecutive direction-wise shifts. The shifted intermediate sets are likely intersected with some mask to avoid board wraps of certain directions, and/or also to consider the occupancy or any reasonable taboo set (i.e. pawn attacks) as flood stopping obstruction.

For the non sliding pieces, pawn, knight and king, one fill cycle covers all potential moves in one certain direction, or even all moves in different directions. However, for the sliding pieces, bishop, rook and queen, one fill cycle covers a direction-wise move step for a union set of attacked squares reachable in one move. Often, the up to seven direction wise fill cycles may be performed in three parallel prefix steps.

Applications of fill algorithms are related to all kinds of pawn properties, progressive mobility and path finding algorithms, f.i. to find so called Trajectories. || toc =Pawn= Pawn fills are performed by north- or south steps, for span determination on the otherwise empty board. If it is about to consider obstructions, the north- or south Dumb7- or Kogge-Stone occluded fill might be applied.
 * M. C. Escher, Plane Filling II, 1957 ||~  ||^   ||


 * Pawn Fills
 * Pawn Spans
 * Attack Spans
 * Dumb7Fill
 * Kogge-Stone Algorithm

=Knight=
 * Knight Fill
 * Knight-Distance

=King=
 * Flood Fill Algorithm
 * All shortest Paths
 * Corresponding Squares

=Sliding Pieces= Albeit intended as direction-wise attack generators, a surrounding loop may determine target in at least N moves sets of sliding pieces as well. One may pass not only pieces as argument, but their attacks repetitively, likely with alternating disjoint directions, i.e. file- versus ranks-attacks for rooks and diagonal versus anti-diagonal attacks for bishops.

> AVX2 Dumb7Fill
 * Dumb7Fill
 * Kogge-Stone Algorithm
 * Fill by Subtraction

=Forum Posts=
 * [|Re: Hyperbola Quiesscene: hardly any improvement] by Karlo Bala Jr., CCC, January 14, 2009 » Hyperbola Quintessence

=External Links= > > media type="custom" key="24335452"
 * [|Flood-fill from Wikipedia]
 * [|Implementing the flood fill algorithm] from [|CodeCodex]
 * [|Pathfinding from Wikipedia]
 * [|Panta rhei, "everything flows" from Wikipedia]
 * Panta Rhei - [|Alles fliesst] (1973), [|YouTube] Video

=References= =What links here?= include page="Fill Algorithms" component="backlinks" limit="40"
 * Up one Level**