{"version":"1.0","type":"rich","title":"wfc in clingo?","description":"This example shows a constraint-solving approach to generating a grid of tiles, where each cell is assigned one of two patterns (a or b) so that adjacent cells follow a set of legal pairings. It encodes the Wave Function Collapse algorithm as an answer-set program in Clingo, using a 5×5 grid defined by `cell(1..n, 1..n)` and rules that generate exactly one assignment per cell. The constraints check every adjacent pair via `dx` offsets and forbid any neighbor combination not listed in the `legal` facts. The output is the `assign/3` relation, which reveals the resulting tile layout.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-4992194b7d2d31b6fcfea353863346cd?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}