An open API service indexing awesome lists of open source software.

https://github.com/james-p-d/nqueens

N-Queens solver in Common Lisp
https://github.com/james-p-d/nqueens

common-lisp lisp n-queens n-queens-problem

Last synced: 4 months ago
JSON representation

N-Queens solver in Common Lisp

Awesome Lists containing this project

README

        

# NQueens
N-Queens solver in Common Lisp

![Screenshot](https://github.com/James-P-D/NQueens/blob/main/screenshot.gif)

## Introduction

The [N-Queens](https://en.wikipedia.org/wiki/Eight_queens_puzzle) is a simple chess-based problem whereby a player attempts to place `N` queen peices on the board such that no queens share the same row, column or diagonal.

## Running

The program was tested using `clisp` on [CygWin](https://www.cygwin.com/). To run:

```
jdorr@DESKTOP-QPTVA3D ~
$ clisp board.lsp
```

You will be prompted to enter the size of board, after which the program will begin to find solutions:

![running](https://github.com/James-P-D/NQueens/blob/main/running.png)