Queens puzzle solver in LISP

This is a typical example of how LISP can be used to solve complex constrained programming tasks. The eight queens puzzle requires the placement of N (minimum) queens in a chessboard so that they do not threaten each other and at the same time control the entire grid. The definition is very simple, but the number of valid solutions explode exponentially as N becomes larger than eight. LISP was officially released in 1960, making it the third milestone programming language of the first era, along with Fortran and COBOL. The syntax of LISP is saturated with parentheses, which makes it somewhat difficult for reading but very efficient for parsing by the interpreter. At the same time it makes search tree creation very intuitive, a paradigm that was later used by several other declarative laguages like Prolog.
Enable captions for more details and walk-through. Source code available at the Github repository (see channel info). Tags: #asmr #coding #programming #notalking #lisp #terminal #console

Comments

Popular Posts

Hello x86: Low-level assembly coding for the 8086

Announcement: Writing a new book in Data Science and R&D projects

Fibonacci numbers in C (4 different ways)

Multiplication tables in COBOL

Bricks and towers in Prolog

Channel Updates