Search found 3 matches
- Sun Mar 13, 2016 1:16 am
- Forum: Common Lisp
- Topic: Vacuum agent problem
- Replies: 1
- Views: 6759
Vacuum agent problem
I have this problem that require me to win this agent. (defmethod get-percept ((env vacuum-world-radar) agent) (let ((grid (copy-array (vacuum-world-grid env))) (home (grid-environment-start env))) (append (call-next-method) (list grid (grid-environment-start env))))) (defstructure (dumb-traversal-v...
- Sat Mar 12, 2016 8:42 pm
- Forum: Common Lisp
- Topic: New to LISP
- Replies: 3
- Views: 10286
Re: New to LISP
Yes David. Thanks for the great help.
- Fri Mar 11, 2016 8:34 am
- Forum: Common Lisp
- Topic: New to LISP
- Replies: 3
- Views: 10286
New to LISP
Hi all, I am very new to lisp. I have this function (adopted from vacuum agent problem) (defun find-closest-in-grid (radar type pos-x pos-y) (labels ((distance (x y) (+ (abs (- x pos-x)) (abs (- y pos-y))))) (destructuring-bind (width height) (array-dimensions radar) (let ((best nil) ((best-distance...