Skip to content

Instantly share code, notes, and snippets.

@pcl-code
pcl-code / ai03.hs
Created October 15, 2020 21:28
Haskell implementation of a CHREST discrimination tree
View ai03.hs
-- This code was used in the paper:
-- P.C.R. Lane and F.Gobet,
-- 'Developing reproducible and comprehensible computational models,'
-- Artificial Intelligence, 144:251-263, 2003.
--
-- Run it using the Glasgow Haskell Compiler, e.g.: ghci ai03.hs -e main
data PIECE = PIECE{xCoord, yCoord::Int, piece::Char}
deriving (Eq,Show)
data NODE = NODE{image::[PIECE], children::[LINK]}
@pcl-code
pcl-code / demo-1.py
Created October 15, 2020 21:05
Python scripting for CHREST: demo-1 in Jython
View demo-1.py
# Demonstration 1 : jython script
#
# jython is available from https://jython.org/downloads.html
#
# Either
# install jython using the installer, and run
# > jython demo-1.py
#
# Or
# download the standalone jython jar file, and run