Summary

I patch frotz to work around a bug in order to play hhgttg and zork inside cterm (Complex Term).

This enables me to use OpenAI’s Codex to play hhgttg.

Precursor article
https://mullikine.github.io/posts/hhgttg/

Zork! with Codex

Setup

1
2
3
4
5
6
7
cd
git clone "https://gitlab.com/DavidGriffith/frotz"
git clone "https://github.com/historicalsource/hitchhikersguide"
apt install libao-dev
apt install libsndfile-dev
apt install libsamplerate-dev
apt install libmodplug-dev

Patch

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
diff --git a/src/curses/ux_screen.c b/src/curses/ux_screen.c
index 950d34d..4d56f61 100644
--- a/src/curses/ux_screen.c
+++ b/src/curses/ux_screen.c
@@ -175,10 +175,11 @@ static void resize_restore_screen(void)
  */
 void unix_resize_display(void)
 {
+/*
  save_screen();
  endwin();
  refresh();
-	resize_restore_screen();
+	resize_restore_screen();*/
 } /* unix_redraw_display */

Play

1
~/frotz/frotz ~/hitchhikersguide/COMPILED/s4.z3

Demo

Findings

I found that Cohere seems to complete text with a focus on generating prose but doesn’t adopt the interactive fiction pattern. If anything, it’s output reads much like a walkthrough.

I also found it useful to switch to Davinci from Codex in order to get out of a repetitive pattern of completions.