AI Dungeon

72 days ago

This was some of the first playthrough of AI Dungeon.

It’s pretty good, all things considered, but it does have the general weakness of GPT-2-based systems, in that it’s terrible with retaining context.

My text input is in bold, and how the computer responded is the plain text.
You are Chobren, a wizard living in the kingdom of Larion. You have a staff and a spellbook. You finish your long journey and finally arrive at the ruin you’ve been looking for. You look around and see that it’s indeed what you were searching for.
It’s a ruined tower with an entrance on the north side
> Enter the ruined tower.

You walk through the door and find yourself inside a large room. There is a table with several bottles of liquid on it and some food on top of them. A few people are sitting around eating and talking. One of them looks up when he sees you and speaks to you
> Listen intently.

“Hello, I’m Zalmora”. She says.
> Say “Hello, Zalmora! May I try one of the bottles of liquid at random?”

She smiles at your request and takes a bottle from the table. She opens it and offers you a sip.
> Sip from the bottle.

It tastes like water, but not really. It’s just…water. The taste lingers in your mouth for a moment before you swallow it down.
> Finish the bottle.

Zalmora turns her head to look at you and gives you a smile. You feel like you’ve been given a gift
> Start drinking more bottles from the table.

The next bottle you drink tastes sweet and slightly sour. It makes you think about how good it would be if you could eat something that tasted this way. You take another sip and then another. Your stomach growls loudly as you continue to drink
> Grab food at random and start eating that too.

Your hunger grows and you begin grabbing food off the tables. You pick up a piece of bread and nibble on it while you’re eating. The smell of the bread fills your nose and the taste fills your mouth
> Belch loudly.

Your belch causes everyone to turn their heads and stare at you. Zalmora stands up and walks over to you. She puts her hand on your shoulder and whispers into your ear.
> Listen to what she whispers.

“I love you”. She whispers.
You nod and return her kiss. After kissing each other, you both leave the room. You hear footsteps coming down the stairs behind you. You follow them and find yourself back in the kitchen
> Wonder at how you lost agency in the previous interaction.

You sit down at the table and notice that the table has now become a small altar. A candle sits near the table and candles burn all around the room. You see a man dressed in black robes standing nearby looking solemn
> Focus! Ask yourself what it was that was in the bottles you just drank. Attempt to reclaim some agency.

You stand up and attempt to grab the bottle that holds the sweet tasting liquid. You fail miserably and fall backwards onto the floor. You scream out in pain and begin to cry. Everyone else notices your distress and begins to comfort you
> Sit upright and tell everyone you’re actually doing fine, you were just “practice-falling”.

You sit up and pull yourself together. You explain that you fell because you had practiced falling so much that you forgot to stop yourself from doing it. You thank everyone for helping you and ask them to stay away from you. They laugh and assure you that they won’t
> Attempt, once again, to reassert some goddamned boundaries.

You sit down and begin to meditate. You close your eyes and concentrate hard on calming your mind. You begin to think about nothing and everything at the same time. You can’t help but notice that you’re getting hungry again. You decide to go get some food
> Fight the urge to get some food. Do nothing, and focus very much on doing nothing for the next five minutes.

You quickly realize that you don’t want any food. You refuse to even touch anything. You begin to panic and yell at everyone for not being able to give you what you wanted. Eventually, you calm down and realize that you need to do something else
> Do nothing. Focus on doing nothing.

You sit down and relax. You begin to think about nothing. You don’t know why, but you suddenly start to feel tired. You lie down and fall asleep.

When you wake up, you find yourself lying on the ground
> Wonder why I end up on the ground so often.

You open your eyes and find yourself lying on the ground. You immediately sit up and realize that you’re naked. You’re surprised by this fact, but it doesn’t seem to bother you anymore. You look around and find that you’re in a forest
> Find clothes.

You run to the nearest tree and begin to search for clothing. You find a shirt and pants and put them on. You also notice that you have no shoes. You run to the closest house and ask the owner for some shoes. He tells you that there isn’t any such thing here
> Ask the man where I can find shoes in my size. I have big feet.

He tells you that you have big feet. He goes on to say that he used to wear shoes, but after his wife died he couldn’t afford them anymore. He gave them to you instead. He says that you should wear them and never take them off ever again
> Am I wearing shoes?

Yes, you are wearing shoes. You stand up and begin to walk towards the house. When you arrive, you see a man holding a sword. He asks you who you are and why you tell him. He tells you that you must be careful and runs off


Simplifying non-trivial root expressions

252 days ago

This was a surprising pair of identities I stumbled on in college.




So, for example, with a=10 and b=2, 8cf03a9fc049419d85c28ec95b88054299ae0cc1

I don’t remember the source of the question, but I suspect it was someone with knowledge of this relation.

I’m very curious whether this is part of a larger class of mathematical expressions involving roots that can be simplified.

Here’s a proof:

Solving for m and n:

a77a14002b55328d044275c83d7b764b70eebdbb   e3d25a3f776fce9a4d1b73a79ee60b686d5450c9

Interestingly, this can be used in a telescoping identity when a=k, b=1:




Fibonacci-like sequences that converge to 0

1877 days ago

I was curious about whether Fibonacci-like sequences could converge to 0, with a proper choice of starting terms and the usual recurrence relationship:


It turns out that they can, if the ratio of the second term to the first is 7249246bfa7088a808ebe568b18dd326c782dc4c, or 1-φ, approximately -0.618.

I found this using the closed form for Fibonacci-like sequences

25e243f0a1759585683430bdfcc60e927f296abc and solving for 510842f7d1fc6a07b50c4521dd7ee6a633628623.

Here are the first few elements of the sequence:

Interestingly, the integer part are the Lucas numbers and the multiples of the square root are the Fibonacci numbers, and their ratio converges to the square root of 5, based on their closed forms.



cor: a sample correlation game

1884 days ago

If you know what sample correlation is, you might enjoy Cor: A Sample Correlation Game, which is available here



truecrypt on the BeagleBone Black (Debian)

2094 days ago

As I’m using Revision B, I ended up downloading source to a mount point on the sdcard (/mnt/sdcard) as it’s too easy to fill up the 2GB root device otherwise.

Download and unpack truecrypt-7.1a-source

Download and unpack wxWidgets

export SDCARD=/mnt/sdcard
cd ${SDCARD}
tar xvfz wxWidgets-2.8.12.tar.gz
export WX_HOME=${SDCARD}/wxWidgets-2.8.12/

Download PKCS11 headers

mkdir ${SDCARD}/pkcs
cd ${SDCARD}
wget '*.h'
export PKCS11_INC=${SDCARD}/pkcs

Build truecrypt

cd ${SDCARD}/truecrypt-7.1a-source
make NOGUI=1 WX_ROOT=${WX_HOME} wxbuild

Copy the binary to the system

sudo cp Main/truecrypt /usr/bin
chown bin.bin /usr/bin/truecrypt
chmod 0755 /usr/bin/truecrypt



« Older