Get the latest tech news

Solving LinkedIn Queens Using Haskell


Solving LinkedIn Queens in the LogicT monad

A partial placement is sound if it does not violate any of the constraints of the problem, i.e., no two queens are in the same row, column, color region, or are diagonally adjacent. If we do have a queen placed in a row, column or color region already, we mark it as Satisfied, and this does not count towards the bad scenario where the subtree is abandoned. SMT solvers, such as Z3, can solve constraint satisfaction problems involving a number of domains (called theories) including boolean logic, arithmetic, and arrays.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Haskell

Haskell

Photo of LinkedIn Queens

LinkedIn Queens

Related news:

News photo

Solving LinkedIn Queens with APL

News photo

Solving LinkedIn Queens with SMT

News photo

APL Interpreter – An implementation of APL, written in Haskell (2024)