Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - duncanbojangles

#1
newLISP newS / Tic Tac Toe solutions in newlisp
May 06, 2008, 01:36:47 PM
Hello. I've played with Scheme before coming to newlisp and to test out newlisp I wrote a program to find all the possible moves in a 3x3 tic tac toe game in a mostly functional manner. In an effort to learn more about newlisp I was wondering if anyone had any other tic tac toe or similar solvers written in a different style.



If anyone wants, I can post the code I have to this thread. Also, I stored the moves in a giant nested list, where each nest of the list represents all the possible next moves of the parent list.

(parent
    (child
        (child child))
    (child
        (child
            (child child child))
        child)))


There's a little more to it, but that's the gist of it. The file that contains this list is 14 megabytes!