Search found 4 matches

by arturoVidal
Mon Sep 16, 2013 7:39 am
Forum: Common Lisp
Topic: Some basic lisp functions -trying to teach myself the basics
Replies: 12
Views: 27621

Re: Some basic lisp functions -trying to teach myself the ba

WOW thanks heaps for your help (both of you ;) )

Finally wrote my static heuristic evaluation function for C4 :D :D :D
by arturoVidal
Sat Sep 14, 2013 10:19 pm
Forum: Common Lisp
Topic: Some basic lisp functions -trying to teach myself the basics
Replies: 12
Views: 27621

Re: Some basic lisp functions -trying to teach myself the ba

There are no circumstances where representing a fixed size 2d structure as a list-of-lists makes sense, but you can use NTH for random-access into lists. For my sudoku solver I use 2D arrays of a "square" class that contains its coordinates (because they also get put in other data structu...
by arturoVidal
Sat Sep 14, 2013 7:58 am
Forum: Common Lisp
Topic: Some basic lisp functions -trying to teach myself the basics
Replies: 12
Views: 27621

Re: Some basic lisp functions -trying to teach myself the ba

Thanks guys. That was a silly mistake 8-) I've come across a slightly tricky problem. Say I have the following parameter which represents a connect 4 board: (defparameter *board* '((nil nil nil nil nil nil) (nil nil nil nil nil nil) (nil nil nil nil nil nil) (nil nil nil nil nil nil) (nil nil nil ni...
by arturoVidal
Fri Sep 06, 2013 5:16 am
Forum: Common Lisp
Topic: Some basic lisp functions -trying to teach myself the basics
Replies: 12
Views: 27621

Some basic lisp functions -trying to teach myself the basics

Hi everyone, So I've been playing around with LISP lately in order to develop an appreciation for functional programming. Now I've come into a problem I can't solve. Here is the scenario. I want to write a function that takes two lists - both lists contain words. The idea is for the function to outp...