;-*- Mode: Lisp; Syntax: Common-lisp -*- ;;;; N-Queens rules, JTRE version ;;; Last edited 1/29/93, by KDF. ;;; Copyright (c) 1986 --- 1992 Kenneth D. Forbus, Northwestern University, ;;; Johan de Kleer and Xerox Corporation. ;;; All rights reserved. ;;; See the file legal.txt for a paragraph stating scope of permission ;;; and disclaimer of warranty. The above copyright notice and that ;;; paragraph must be included in any separate copy of this file. (in-package :cl-user) (contradiction 'queens-capture *jtre*) (rule ((:in (queen ?column1 ?row1) :var ?q1) (:in (queen ?column2 ?row2) :var ?q2 :test (not (or (= ?column1 ?column2) (queens-okay? ?column1 ?row1 ?column2 ?row2))))) (rassert! queens-capture (death ?q1 ?q2)))