Tag Archives: Java

i.am.dani @MSXGOTO40 live VJ stream

This is a re-recording my VJ performance for MSX composer Tadahiro Nitta at MSXGOTO40 in Amsterdam in December 2023 Featuring:

– i.am.dani – The AI Chatbot from 1987 that comes to life in 2023 to make art and write poetry
– MIDI controlled, sound generated algorithmic art
– Creative coding projects made by TU Dublin Computer Science and Game Design students inspired by the story of MSX
– Gameplay of MSX games from which the music is taken

All music made and performed by Tadahiro Nitta on MSX computers

GAZZEL INTRO
GG TROIS
BACKFLOW WAVE – Raging Blitz
BOSS BGM – Raging Blitz
STAGE CLEAR– Raging Blitz
STAFF ROLL – Raging Blitz
CAR NO 52 IT SEQUENCE
XAK 2 INTROSCREEN
XAK 1 WATERDRAGON
FRAY Last Boss –
DARKMAZE ILLUSION CITY – theme A

Source code for i.am.dani https://github.com/skooter500/iamdani

DANI: A poetry writing chatbot from 1987 arrives in 2023

This semester my OOP students programmed a sonnet writing chatbot called DANI, for their programming test. Here are a couple of DANI’s poems:

father let this in thee shall shine
identify do mine only care i ensconce
who calls thee releasing
fleeting year would have lookd on the
thine heir might have faculty by us
thrall
bed
liii
presence grace impiety
wane so suited and sun of hand
untrue
sending a united states who will believe
project gutenbergtm license apply to anyone in
nurseth the lease of compliance to identify

adding one most which the deathbed whereon
travel forth all away yourself in process
seen the wretch to complying with frost
being fond on men ride
whateer thy minds to occur a son
reported to prove me words respect
famine where i cannot contain a bastard
thorns did exceed
effectually is had stoln of year thou
treasure of skill and unfatherd fruit
liii
5000 are restord and distribution of hearsay
ill well esteemd
stole that fair friend for through 1e7

DANI works, by loading a text document and storing a list of each word from the document along with a list of what words follow the word. This is called the model. For example, for this input file:

i love Star Trek
love is love
I love TU Dublin 

DANI will generate the following model:

i: love(2) 
love: star(1) is(1) tu(1) 
star: trek(1)
trek:
is: love(1)
tu: dublin(1)
dublin:

Each word is listed once in the model, regardless of how many times it occurs in the document. Each word is printed and all of the words that follow the word in the text with a count of how many times it follows the word are listed. In the above example, the words star is and tu follow the word love with a count of 1 each. The word i is followed by the word love twice.

To write a poem, DANI picks one word at random from the model and starts with that. DANI then looks to see what possible words will follow the chosen word and it picks one at random from the list for the next word. It then repeats the process until it has 8 words, or until it finds a word that has nothing following it – in which case it will terminate the sentence. It does this 14 times to write a poem as there are 14 lines in a sonnet.

For the test, the students used a text file of Shakespeare sonnets. Here is the full test & starter code. And the solution.

DANI stands for Dynamic Artificial Non-Intelligence. It is a chatbot for the MSX that was invented by Sean Davidson and published, with source code in MSX Computing magazine in 1987. I fondly recall typing the program (in MSX Basic) into my Spectravideo SVI-728 MSX computer and seeing my computer produce amusing responses to my prompts. Unfortunately, all pictures are lost of this amazing breakthrough, but here is a picture that the AI made of this:

Here is are some pages from the article in MSX Computing:

The full article is here.

DANI is an n-gram language model, where n is 1. 5-gram language models were state-of the-art text generators not so long ago. What is interesting is that if you copy-and-paste the test into Chat-GPT3, it will produce a solution which is 100% correct and this is what many of my students did :-(.

Nematodes

I recently read a fascinating thesis about nematodes. Nematodes are the most abundant multicellular organisms on the planet and there are around 40 quintillion of them. Inspired by the humble nematode, I wrote two programming lab tests.

This one is for fourth year Games Engines students and it uses C# and Unity to create a simulation of a school of nematodes swimming and wriggling and avoiding each other:

https://github.com/skooter500/GE2-Test-2022-Starter

This one for second year OOP students and it uses java and the processing libraries to visualise a fictitious dataset of nematodes: 

https://github.com/skooter500/OOP-Test-2022-Starter

Here are the solutions:

https://github.com/skooter500/GE2-Test-2022

https://github.com/skooter500/OOP-Test-2022