Skip to content

Instantly share code, notes, and snippets.

@kenwebb
Last active July 28, 2025 11:27
Show Gist options
  • Save kenwebb/9359d1621fa53eabd298e1003da17206 to your computer and use it in GitHub Desktop.
Save kenwebb/9359d1621fa53eabd298e1003da17206 to your computer and use it in GitHub Desktop.
Language Learning Game
<?xml version="1.0" encoding="UTF-8"?>
<!--Xholon Workbook http://www.primordion.com/Xholon/gwt/ MIT License, Copyright (C) Ken Webb, Mon Jul 28 2025 07:26:44 GMT-0400 (Eastern Daylight Time)-->
<XholonWorkbook>
<Notes><![CDATA[
Xholon
------
Title: Language Learning Game
Description:
Url: http://www.primordion.com/Xholon/gwt/
InternalName: 9359d1621fa53eabd298e1003da17206
Keywords: AI, Italian, Learn
My Notes
--------
27 July 2025
This workbook tests the idea that AI can readily create game-like language learning exercises.
In the 1970's I wrote several language puzzles of this type for Games magazine, based on an idea I found in linguistics workbooks.
I used **ollama run llam3** on the mac mini, **duck.ai** online, and **ChatGPT** online.
]]></Notes>
<markdown><![CDATA[
#### ollama llama3
% ollama run llama3
>>> I want to learn some basic Italian. You are fluent in English and Italian, and you know about language games.
... Create a game where you generate four short sentences in Italian, with
... the English translation of each. Then generate a fifth short sentence in Italian without the English translation.
... All the words in this fifth sentence must have appeared in the or
... iginal four sentences. I will translate the fifith sentence into English.
What a great idea! Let's play a game called "Italian Connection". Here are your four initial sentences:
1. Io amo leggere libri (I love to read books)
2. Il mio migliore amico si chiama Luca (My best friend is named Luca)
3. La mia città natale è Roma (My hometown is Rome)
4. Vorrei mangiare una bella pizza (I would like to eat a nice pizza)
And now, here's the fifth sentence without an English translation:
5. Vado al mio migliore amico a Roma per mangiare una bella pizza con Luca e leggere un libro mentre attendiamo un'ora il treno.
Your task is to translate sentence 5 into English using your knowledge of Italian and the vocabulary you've learned from sentences 1-4! Good luck, and buona fortuna (good luck)
with your translation!
>>> I go to see my best friend Luca in Rome to eat a nice pizza and read a book during the one hour train ride.
Bravo!
Your translation is almost perfect! You got most of the sentence right, but there's a small mistake. The phrase "Vado al mio migliore amico" actually means "I'm going to my best
friend" (note the possessive pronoun "mio" agrees with the noun "amico"), so it implies that you're visiting your best friend in Rome, not seeing them.
So, the corrected translation would be:
"I'm going to my best friend Luca's place in Rome to eat a nice pizza and read a book during the one hour train ride."
Great job, though! You've got the hang of Italian grammar and vocabulary already!
Want to play again? I can generate four new sentences for you to learn from, and then create another sentence that requires using those words. Just let me know!
>>> yes
KSW I did several more exercises
>>> Please capture all the exercises as a JSON structure. The following is an example of the structure that I am looking for, for one exercise: {
... "examples": [
... {"it": "Io amo leggere libri","en": "I love to read books"},
... {"it": "Il mio migliore amico si chiama Luca", "en": "My best friend is named Luca"},
... {"it": "La mia città natale è Roma", "en": "My hometown is Rome"},
... {"it": "Vorrei mangiare una bella pizza", "en": "I would like to eat a nice pizza"}
... ],
... "test": {
... "it": "Vado al mio migliore amico a Roma per mangiare una bella pizza con Luca e leggere un libro mentre attendiamo un'ora il treno.",
... "en": "I'm going to my best friend Luca's place in Rome to eat a nice pizza and read a book during the one hour train ride."
... }
... }
Here are all the exercises captured as a JSON structure:
```
{
"exercises": [
{
"examples": [
{"it": "Io amo leggere libri", "en": "I love to read books"},
{"it": "Il mio migliore amico si chiama Luca", "en": "My best friend is named Luca"},
{"it": "La mia città natale è Roma", "en": "My hometown is Rome"},
{"it": "Vorrei mangiare una bella pizza", "en": "I would like to eat a nice pizza"}
],
"test": {
"it": "Vado al mio migliore amico a Roma per mangiare una bella pizza con Luca e leggere un libro mentre attendiamo un'ora il treno.",
"en": "I'm going to my best friend Luca's place in Rome to eat a nice pizza and read a book during the one hour train ride."
}
},
{
"examples": [
{"it": "Ho un fratello che si chiama Marco", "en": "I have a brother named Marco"},
{"it": "Il mio cane si chiama Max e è molto fedele", "en": "My dog is named Max and very loyal"},
{"it": "La mia famiglia vive in campagna", "en": "My family lives in the countryside"},
{"it": "Vorrei visitare la spiaggia il weekend prossimo", "en": "I would like to visit the beach next weekend"}
],
"test": {
"it": "Vado a trovare mio fratello Marco e Max al parco con la mia famiglia per una giornata di libertà e poi andiamo in città per passare il weekend prossimo sulla spiaggia.",
"en": "I'm going to visit my brother Marco and his dog Max at the park with my family for a day. Then, we'll head into town to spend next weekend at the beach."
}
},
{
"examples": [
{"it": "Il mio preferito cibo è il pizza", "en": "My favorite food is pizza"},
{"it": "La mia amica si chiama Sophia e è molto gentile", "en": "My friend Sophia is very kind"},
{"it": "Vivo in un piccolo appartamento", "en": "I live in a small apartment"},
{"it": "Vorrei imparare a giocare il piano", "en": "I would like to learn how to play the piano"}
],
"test": {
"it": "Vado al ristorante con la mia amica Sophia e sua sorella per ordinarci una pizza e ascoltare un concerto mentre attendiamo che il pianista finisca di suonare il suo brano preferito.",
"en": "I'm going to the restaurant with my friend Sophia and her sister to order a pizza and attend a concert where we'll wait for the pianist to finish playing his favorite piece."
}
},
{
"examples": [
{"it": "La mia città natale è Firenze", "en": "My hometown is Florence"},
{"it": "Il mio migliore amico si chiama Alessandro", "en": "My best friend is named Alexander"},
{"it": "Vorrei imparare a giocare il tennis", "en": "I would like to learn how to play tennis"},
{"it": "Ho un fratello che si chiama Luca e ama il calcio", "en": "I have a brother named Luke and he loves soccer"}
],
"test": {
"it": "Vado al mio migliore amico Alessandro in città per giocare un match di tennis con lui e suo fratello Luca al parco mentre attendiamo che il tempo migliori prima di andare al Campo Comunale per assistere alla partita del weekend.",
"en": "I'm going to my best friend Alexander's place in the city to play a tennis match with him and his brother Luke at the park while we wait for the weather to improve. Then, we'll head over to the public park for some of the weekend, maybe even catch a soccer game with Luke's team."
}
},
{
"examples": [
{"it": "Mi piace lavorare con il computer", "en": "I like working on my computer"},
{"it": "Ho imparato a usare Microsoft Office", "en": "I have learned to use Microsoft Office"},
{"it": "Vorrei creare un sito web", "en": "I would like to create a website"},
{"it": "Sono un utente di Linux", "en": "I am a user of Linux"}
],
"test": {
"it": "Vado al mio computer per installare il nuovo software e poi creare un file sul disco rigido.",
"en": "I'm going to my computer to install the new software and then create a file on the hard drive."
}
},
{
"examples": [
{"it": "Sono un amante della tecnologia", "en": "I am a lover of technology"},
{"it": "Vorrei imparare a codificare in Python", "en": "I would like to learn how to code in Python"},
{"it": "Ho bisogno di un antivirus", "en": "I need an antivirus"},
{"it": "Mi piace giocare con il mio drone", "en": "I like playing with my drone"}
],
"test": {
"it": "Vado al mio laptop per scaricare il nuovo gioco online e poi creare una nuova account su Steam.",
"en": "I'm going to my laptop to download the new online game and then create a new account on Steam."
}
},
]
}
```
Let me know if you'd like me to add or modify anything!
#### duck.ai Mistral 3
I want to learn some basic Italian.
You are fluent in English and Italian, and you know about language games.
Create a game where you generate four short sentences in Italian,
with the English translation of each.
Then generate a fifth short sentence in Italian without the English translation.
All the words in this fifth sentence must have appeared in the original four sentences.
I will translate the fifth sentence into English.
Sure, let's start the game!
Here are four short sentences in Italian with their English translations:
1. **Il gatto è sul tetto.**
- The cat is on the roof.
2. **Il cane corre nel parco.**
- The dog runs in the park.
3. **Il libro è sul tavolo.**
- The book is on the table.
4. **Il bambino gioca con il gatto.**
- The child plays with the cat.
Now, here is the fifth sentence in Italian without the English translation:
**Il bambino corre con il gatto sul tetto.**
Please translate this sentence into English.
KSW The child runs with the cat on the roof.
That's correct! Great job translating the sentence.
Here are four new sentences in Italian with their English translations:
1. **La mela è rossa.**
- The apple is red.
2. **La ragazza legge un libro.**
- The girl reads a book.
3. **Il ragazzo mangia una mela.**
- The boy eats an apple.
4. **La casa è grande.**
- The house is big.
Now, here is the fifth sentence in Italian without the English translation:
**La ragazza mangia una mela nella casa.**
Please translate this sentence into English.
[
{
"examples": [
{"it": "Il gatto è sul tetto", "en": "The cat is on the roof"},
{"it": "Il cane corre nel parco", "en": "The dog runs in the park"},
{"it": "Il libro è sul tavolo", "en": "The book is on the table"},
{"it": "Il bambino gioca con il gatto", "en": "The child plays with the cat"}
],
"test": {
"it": "Il bambino corre con il gatto sul tetto",
"en": "The child runs with the cat on the roof"
}
},
{
"examples": [
{"it": "La mela è rossa", "en": "The apple is red"},
{"it": "La ragazza legge un libro", "en": "The girl reads a book"},
{"it": "Il ragazzo mangia una mela", "en": "The boy eats an apple"},
{"it": "La casa è grande", "en": "The house is big"}
],
"test": {
"it": "La ragazza mangia una mela nella casa",
"en": "The girl eats an apple in the house"
}
},
{
"examples": [
{"it": "Il cielo è blu", "en": "The sky is blue"},
{"it": "La montagna è alta", "en": "The mountain is high"},
{"it": "L'uccello vola nel cielo", "en": "The bird flies in the sky"},
{"it": "Il fiume scorre lentamente", "en": "The river flows slowly"}
],
"test": {
"it": "L'uccello vola sopra la montagna alta",
"en": "The bird flies over the high mountain"
}
},
{
"examples": [
{"it": "La porta è aperta", "en": "The door is open"},
{"it": "Il bambino gioca con il pallone", "en": "The child plays with the ball"},
{"it": "La mamma cucina la cena", "en": "The mom cooks dinner"},
{"it": "Il papà legge il giornale", "en": "The dad reads the newspaper"}
],
"test": {
"it": "Il bambino gioca con il pallone vicino alla porta aperta",
"en": "The child plays with the ball near the open door"
}
}
]
#### ChatGPT online
{
"examples": [
{ "it": "Il gatto dorme sul letto", "en": "The cat sleeps on the bed" },
{ "it": "La bambina mangia una mela", "en": "The girl eats an apple" },
{ "it": "Il cane corre nel parco", "en": "The dog runs in the park" },
{ "it": "La mela è sul tavolo", "en": "The apple is on the table" }
],
"test": {
"it": "Il cane dorme sul tavolo",
"en": "The dog sleeps on the table"
}
},
{
"examples": [
{ "it": "Il ragazzo legge un libro", "en": "The boy reads a book" },
{ "it": "La donna scrive una lettera", "en": "The woman writes a letter" },
{ "it": "Il libro è sul tavolo", "en": "The book is on the table" },
{ "it": "La ragazza legge una lettera", "en": "The girl reads a letter" }
],
"test": {
"it": "La donna legge un libro",
"en": "The woman reads a book"
}
},
{
"examples": [
{ "it": "L’uomo beve acqua", "en": "The man drinks water" },
{ "it": "La bambina beve latte", "en": "The girl drinks milk" },
{ "it": "L’acqua è fredda", "en": "The water is cold" },
{ "it": "Il latte è caldo", "en": "The milk is hot" }
],
"test": {
"it": "L’uomo beve latte",
"en": "The man drinks milk"
}
}
]]></markdown>
<_-.XholonClass>
<PhysicalSystem/>
<ExamplesDatabase/>
</_-.XholonClass>
<xholonClassDetails>
</xholonClassDetails>
<PhysicalSystem>
<ExamplesDatabase jso="JSO">
<Attribute_String><![CDATA[{"exercises": [
{
"examples": [
{"it": "Io amo leggere libri","en": "I love to read books"},
{"it": "Il mio migliore amico si chiama Luca", "en": "My best friend is named Luca"},
{"it": "La mia città natale è Roma", "en": "My hometown is Rome"},
{"it": "Vorrei mangiare una bella pizza", "en": "I would like to eat a nice pizza"}
],
"test": {
"it": "Vado al mio migliore amico a Roma per mangiare una bella pizza con Luca e leggere un libro mentre attendiamo un'ora il treno.",
"en": "I'm going to my best friend Luca's place in Rome to eat a nice pizza and read a book during the one hour train ride."
}
},
{
"examples": [
{"it": "Ho un fratello che si chiama Marco", "en": "I have a brother named Marco"},
{"it": "Il mio cane si chiama Max e è molto fedele", "en": "My dog is named Max and very loyal"},
{"it": "La mia famiglia vive in campagna", "en": "My family lives in the countryside"},
{"it": "Vorrei visitare la spiaggia il weekend prossimo", "en": "I would like to visit the beach next weekend"}
],
"test": {
"it": "Vado a trovare mio fratello Marco e Max al parco con la mia famiglia per una giornata di libertà e poi andiamo in città per passare il weekend prossimo sulla spiaggia.",
"en": "I'm going to visit my brother Marco and his dog Max at the park with my family for a day. Then, we'll head into town to spend next weekend at the beach."
}
},
{
"examples": [
{"it": "Il mio preferito cibo è il pizza", "en": "My favorite food is pizza"},
{"it": "La mia amica si chiama Sophia e è molto gentile", "en": "My friend Sophia is very kind"},
{"it": "Vivo in un piccolo appartamento", "en": "I live in a small apartment"},
{"it": "Vorrei imparare a giocare il piano", "en": "I would like to learn how to play the piano"}
],
"test": {
"it": "Vado al ristorante con la mia amica Sophia e sua sorella per ordinarci una pizza e ascoltare un concerto mentre attendiamo che il pianista finisca di suonare il suo brano preferito.",
"en": "I'm going to the restaurant with my friend Sophia and her sister to order a pizza and attend a concert where we'll wait for the pianist to finish playing his favorite piece."
}
},
{
"examples": [
{"it": "La mia città natale è Firenze", "en": "My hometown is Florence"},
{"it": "Il mio migliore amico si chiama Alessandro", "en": "My best friend is named Alexander"},
{"it": "Vorrei imparare a giocare il tennis", "en": "I would like to learn how to play tennis"},
{"it": "Ho un fratello che si chiama Luca e ama il calcio", "en": "I have a brother named Luke and he loves soccer"}
],
"test": {
"it": "Vado al mio migliore amico Alessandro in città per giocare un match di tennis con lui e suo fratello Luca al parco mentre attendiamo che il tempo migliori prima di andare al Campo Comunale per assistere alla partita del weekend.",
"en": "I'm going to my best friend Alexander's place in the city to play a tennis match with him and his brother Luke at the park while we wait for the weather to improve. Then, we'll head over to the public park for some of the weekend, maybe even catch a soccer game with Luke's team."
}
},
{
"examples": [
{"it": "Mi piace lavorare con il computer", "en": "I like working on my computer"},
{"it": "Ho imparato a usare Microsoft Office", "en": "I have learned to use Microsoft Office"},
{"it": "Vorrei creare un sito web", "en": "I would like to create a website"},
{"it": "Sono un utente di Linux", "en": "I am a user of Linux"}
],
"test": {
"it": "Vado al mio computer per installare il nuovo software e poi creare un file sul disco rigido.",
"en": "I'm going to my computer to install the new software and then create a file on the hard drive."
}
},
{
"examples": [
{"it": "Sono un amante della tecnologia", "en": "I am a lover of technology"},
{"it": "Vorrei imparare a codificare in Python", "en": "I would like to learn how to code in Python"},
{"it": "Ho bisogno di un antivirus", "en": "I need an antivirus"},
{"it": "Mi piace giocare con il mio drone", "en": "I like playing with my drone"}
],
"test": {
"it": "Vado al mio laptop per scaricare il nuovo gioco online e poi creare una nuova account su Steam.",
"en": "I'm going to my laptop to download the new online game and then create a new account on Steam."
}
},
{
"examples": [
{"it": "Il gatto è sul tetto", "en": "The cat is on the roof"},
{"it": "Il cane corre nel parco", "en": "The dog runs in the park"},
{"it": "Il libro è sul tavolo", "en": "The book is on the table"},
{"it": "Il bambino gioca con il gatto", "en": "The child plays with the cat"}
],
"test": {
"it": "Il bambino corre con il gatto sul tetto",
"en": "The child runs with the cat on the roof"
}
},
{
"examples": [
{"it": "La mela è rossa", "en": "The apple is red"},
{"it": "La ragazza legge un libro", "en": "The girl reads a book"},
{"it": "Il ragazzo mangia una mela", "en": "The boy eats an apple"},
{"it": "La casa è grande", "en": "The house is big"}
],
"test": {
"it": "La ragazza mangia una mela nella casa",
"en": "The girl eats an apple in the house"
}
},
{
"examples": [
{"it": "Il cielo è blu", "en": "The sky is blue"},
{"it": "La montagna è alta", "en": "The mountain is high"},
{"it": "L'uccello vola nel cielo", "en": "The bird flies in the sky"},
{"it": "Il fiume scorre lentamente", "en": "The river flows slowly"}
],
"test": {
"it": "L'uccello vola sopra la montagna alta",
"en": "The bird flies over the high mountain"
}
},
{
"examples": [
{"it": "La porta è aperta", "en": "The door is open"},
{"it": "Il bambino gioca con il pallone", "en": "The child plays with the ball"},
{"it": "La mamma cucina la cena", "en": "The mom cooks dinner"},
{"it": "Il papà legge il giornale", "en": "The dad reads the newspaper"}
],
"test": {
"it": "Il bambino gioca con il pallone vicino alla porta aperta",
"en": "The child plays with the ball near the open door"
}
},
{
"examples": [
{ "it": "Il gatto dorme sul letto", "en": "The cat sleeps on the bed" },
{ "it": "La bambina mangia una mela", "en": "The girl eats an apple" },
{ "it": "Il cane corre nel parco", "en": "The dog runs in the park" },
{ "it": "La mela è sul tavolo", "en": "The apple is on the table" }
],
"test": {
"it": "Il cane dorme sul tavolo",
"en": "The dog sleeps on the table"
}
},
{
"examples": [
{ "it": "Il ragazzo legge un libro", "en": "The boy reads a book" },
{ "it": "La donna scrive una lettera", "en": "The woman writes a letter" },
{ "it": "Il libro è sul tavolo", "en": "The book is on the table" },
{ "it": "La ragazza legge una lettera", "en": "The girl reads a letter" }
],
"test": {
"it": "La donna legge un libro",
"en": "The woman reads a book"
}
},
{
"examples": [
{ "it": "L’uomo beve acqua", "en": "The man drinks water" },
{ "it": "La bambina beve latte", "en": "The girl drinks milk" },
{ "it": "L’acqua è fredda", "en": "The water is cold" },
{ "it": "Il latte è caldo", "en": "The milk is hot" }
],
"test": {
"it": "L’uomo beve latte",
"en": "The man drinks milk"
}
}
]}
]]></Attribute_String>
<Script><![CDATA[
const str = this.prev().text().trim();
this.parent().jso = $wnd.JSON.parse(str);
this.parent().first().remove();
]]></Script>
</ExamplesDatabase>
</PhysicalSystem>
<ExamplesDatabasebehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[
var me, exlen, beh = {
postConfigure: function() {
me = this.cnode.parent();
exlen = me.jso.exercises.length;
me.println(`There are currently ${exlen} exercises.`);
},
act: function() {
me.println(me.jso.exercises[Math.floor(Math.random() * exlen)].examples[Math.floor(Math.random() * 4)].it);
}
}
//# sourceURL=ExamplesDatabasebehavior.js
]]></ExamplesDatabasebehavior>
<SvgClient><Attribute_String roleName="svgUri"><![CDATA[data:image/svg+xml,
<svg width="100" height="50" xmlns="http://www.w3.org/2000/svg">
<g>
<title>ExamplesDatabase</title>
<rect id="PhysicalSystem/ExamplesDatabase" fill="#98FB98" height="50" width="50" x="25" y="0"/>
<g>
<title>ExamplesDatabasebehavior</title>
<rect id="PhysicalSystem/ExamplesDatabase/ExamplesDatabasebehavior" fill="#6AB06A" height="50" width="10" x="80" y="0"/>
</g>
</g>
</svg>
]]></Attribute_String><Attribute_String roleName="setup">${MODELNAME_DEFAULT},${SVGURI_DEFAULT}</Attribute_String></SvgClient>
</XholonWorkbook>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment