Programming Portfolio

"There are two ways to write an error free program. Only the third one works."

Bastian Tenbergen [eMail: tenbergeoswego.edu] [www.handbuchonanierer.de.vu]

Computational Models of Cognitive Science - Cog366 - Fall 2005 SUNY Oswego

This page references Lisp programs, Lisp program demos, and other documents associated with this course.

Jump to: Introduction to Lisp
Crypto Decomposition Machines
Crypto Heuristic Machine
Object Oriented Programming in cLISP
Genetic Programming in cLISP
Multi Agent Systems - A Presentation
Misc Programs and Files
A Lisp-Fortune


Introduction to Lisp

Illustrates how to get into Lisp, how to present forms, how to get back to the top Level after an error has occurred, and out of Lisp.
Illustrates to arithmetic expression evaluation.
Illustrates random number generation and list construction.


generate_s.l Displays Lisp code to generate Crypto problems of size 5.
generate_s.demo Illustrates the generation of Crypto problems of size 5.

generate_g.l Displays Lisp code to generate Crypto problems of any size.
generate_g.demo Illustrates the generation of Crypto problems of different sizes.

Crypto Decomposition Machines


solver_2.l Decrypts order-2 problems.
order_2.demo Illustrates the decomposition of Crypto problems of order 2.

solver_3.l Decrypts order-3 problems.
order_3.demo Illustrates the decomposition of Crypto problems of order 3.

solver_4.l Decrypts order-4 problems.
order_4.demo Illustrates the decomposition of Crypto problems of order 4.


Crypto Heuristic Machine


hm1.l Heuristic Crypto Problem Solving Machine v1 using 3 simple heuristics

hm2.l Heuristic Crypto Problem Solving Machine v2 using 10 simple heuristics

tools.l Tools for the Heuristic Crypto Machines.

hm2-tester.l A Testing Program for the Heuristic Crypto Machine v2.
hm2.demo Illustrates the solving of Crypto problems of order 5 using the Heuristic Machine v2

heuristic-applicability.l A program that measures the heuristic applicability of the 10 heuristics.
applicability.demo Illustrates the applicability of the ten heuristics of the Heuristic Machine v2.
probability.demo Illustrates the probability of the ten heuristics of the Heuristic Machine v2
to solve a random Crypto Problem of order-5.


Object Oriented Programming in cLISP


coin_class.l Class simulating a coin with several functions.

die_class.l Class simulating a die with several functions.

coin-n-die-tester.l Tests the coin and the die.
homework.demo Output of the tested coin and die.


Genetic Programming in cLISP


dobby.l
This is the First Version of the simple Stimulus Response Agent named "Dobby". Dobby is given basic functionality - he moves along the walls in his room.
dobby_v1.demo A demo of Dobby's behaviour.


dobby.l The Second Version of the Stimulus Response Agent named "Dobby". Dobby has been augmented with the ability to walk into a random direction. Complex actions and probes are created on-the-fly. These display online generated rules for Dobby's movement.
dobby_v2.demo In terms of Genetic Programming, the online generated complex actions display individuals
of the initial population0. This is a demo of the probe and action generation.


dobby.l The Third Version of the Stimulus Response Agent named "Dobby". Functionality to mutate and crossover individuals in terms of Genetic Programming have been implemented.
dobby_v3.demo This is a demo of Version Three - Complex individual generation mutation and crossover.


dobby.l The Fourth Version of the Stimulus Response Agent named "Dobby". Dobby's World has been modelled in terms of Object Oriented Programming in CLOS.
dobby_v4.demo This is a demo of Version Four
- Simple Simulations of the World.


dobby.l The Fifth Version of the Stimulus Response Agent named "Dobby". Individuals habe been modelled in terms of Object Oriented Programming and the Fitness Metric has been implemented.
test_dobby_v5.l A Simple Test Program for Dobby v5.
dobby_v5.demo This is a demo of Version Five
- Simulation of the Individuals,
the population and the Fitness Metric.


dobby.l The Sixth Version of the Stimulus Response Agent named "Dobby".A Population has been modelled and the Genetic Algorithm has been completed. Now, full functionality in terms of GP is enabled.
test_dobby_v6.l A Simple Test Program for Dobby v6.
dobby_v6.demo A demo of the Genetic Program. The
output has been slightly reduced to
increase readability.


Multi Agent Systems - A Presentation


MAS.pdf A introductory presentation on Multi Agent Systems. Intelligent Agent Structures are discussed according to M. Wooldridge's book
"An Introduction to Multi Agent Systems". The Naming Game by Luc Steel is introduced as an example of a Multi Agent System and a study on influences on MAS is presented.
ng21.pdf Luc Steel's original paper on the Naming Game. Please note the copyright.
Paper_NamingGame.zip The Naming Game Tweaked - full paper with source codes.
A research on influences on MAS.
RA_and_HA.pdf Aditional information on Agent Architectures after M. Wooldridge's book "An Introduction to Multi Agent Systems".


Misc Programs and Files


classify.l A program, classifying an input number as positive, negative, zero or NAN (not a number).

iota.l Creates a list from 1 to n with 1 to n as elements.

product.l Computes the overall produkt of the input list.

factorial.l Uses IOTA and product to define a really space inefficient factorial function.

size.l Determines the size of an input list.

rac.l A recursive program that returns a list's last element.

kth.l A recursive program that returns a list's kth element.

count-number.l A recursive program that returns the number of occurrences of a given number in a given list.

adjacent-pair.l Returns either two of the numbers in the list provided if they differ from one another by 1 or nil.

mapcar-1.l Works like mapcar except that it only works for functions of one argument.


A Lisp Fortune

'A student, in hopes of understanding the Lambda-nature, came to Greenblatt. As they spoke a Multics system hacker walked by. "Is it true," asked the student, "that PL-1 has many of the same data types as Lisp?" Almost before the student had finished his question, Greenblatt shouted "F00!", and hit the student with a stick.' - Taken from "fortune" for BSD, 1994