ROGOMATIC/ROGUE PROJECT STATUS:

INTRODUCTION:

In ancient times (the early to mid 1980s, ok, so not quite so ancient 😄 ) there was a Unix curses game called Rogue. Then some people had fun writing another program called Rog-O-Matic which plays Rogue. I won’t admit how much time I spent playing Rogue back then. Even now it is still fun to play. However, back then, the University didn’t allow Rog-O-Matic to run on the machine. I’ve always wanted to see Rog-O-Matic run as it was an early example of “genetic programming”.

A while ago I found a more recent version of Rog-O-Matic and have updated and fixed some bugs to get a version going for Debian Gnu/Linux. For 32 bit systems it should run ok, not all bugs are fixed but it should get somewhere. For 64 bitsystems the mismatches between parameters declared in one place being pointer to char and in other places being int, which causes segfaults when pointers don’t have enough space - so a straight compile will end up with a program which will segfault, but if you add the -m32 option to CFLAGS then the resulting binaries will run.

ROG-O-MATIC MOST RECENT NEWS:

Version 2.0.3 is here. I increased the morecount so that the program should not give a fatal error for being repeatedly frozen or hit by water.
There remains plenty of fine tuning and more bugs to work on. See NEWS, ChangeLog and TODO for more details.

ROGUE MOST RECENT NEWS:

CURRENT BUILD TESTING STATUS:

With the gcc version gcc (Debian 7.3.0-11) 7.3.0, ncurses 6.1.1 and automake 1.15.1-3 in Debian testing and unstable looks fine when configuring, building, running (need CFLAGS adjusted for 64 bit systems see above). Previous versions should also work. Note that gcc at the moment has more warnings turned on by default than previous versions (I’m pretty much ignoring them, I don’t have the time or interest to do a full code fixup/review).

ROGUE 3.6.4, 5.4.5:

ROGUE 3.6.4

A while ago, I wanted to try something a little different so I compiled the RRP Version 3.6.4 of rogue from coredumpcentral that had been posted some time ago and copied that resulting binary to /usr/local/bin/rogue (instead of rogue36) which is where rogomatic would expect to find it. I was surprised that it actually did run. The file names in /var/games/rogomatic are a bit confused, but they are there as: (GeneLog362, GenePool362, ltm362 and rgmdelta3.6.4) However, since the RRP version has no hooks for the random number SEED or the PID this will not work with the debugging scripts (I’d have to make quite a few changes to get mainloop to work with a different set of files). This was just an exercise to see if it would run. When the hero dies or is finished it will take some time before the roguelog is renamed to the monster or reason for why the hero stopped. If you want out faster hit ctrl-C and reset the terminal to get back to the normal shell prompt and the files will be left in the current directory (from where you run rogomatic -eh): (debuglog.frogue, debuglog.player, rogomaticpid.# and roguelog). As it doesn’t get all that far or do much this is not how I would recommend running it. The [LATEST] versions do much better.

ROGUE 5.4.5

While testing out more recent compiler versions I’ve been trying to see if I can get rogue version 5.4.5 to work, but as of yet it looks like there are some significant IO changes which means my version of Rogomatic doesn’t work very well when combined with rogue 5.4.5 The number of changes that are different between rogue 5.4.4 and 5.4.5 are large enough it may take some time to figure this out. Likely will end up being yet another winter project…

For best results in running Rog-O-Matic use the most recent versions of Rogue and Rog-O-Matic marked [LATEST] posted below.

ROGUE MINIMAL ALTERNATE TRACK:

As I’ve been doing various tasks over the years I’ve realized that by making as many changes as I did to expand Macros and change indentation that it has made comparisons to other versions much harder on myself than what is needed. With that thought in mind a while ago I tried to start a different track in the Rogue 5.4.4 Source code which makes it easier to do comparisons. The first versions are now available (initial import, set up environment variables and fix the first bug found). As I get more time coming up this winter season I hope I can make more progress. My other reason for doing this is that it may be the case that my changes in the other versions have introduced bugs and I’d like to try something different. By starting at the initial SEED of 1 and then running until I hit a bug (then hopefully fixing that bug without introducing other bugs or altering how the previous runs might turn out) and then continuing past each bug I should have a good set of tests to compare for unintended bugs being introduced. At least that is the theory! We’ll see how it goes… For now though the versions marked LATEST are still the best because they’ve been altered to make things more clear (less ambiguous in some messages that Rogue sends and more bug fixes) [If this changes and these minimal versions seem to be doing better I’ll update this bit]. My fall/winter tinkering in this stuff is probably going to mostly be on this track (when/if i get back to it sometime).

Skip to the DOWNLOADS section below if you aren’t interested in the terminal or debugging scripts…

OTHER THINGS, EXTRAS: Programs/scripts used to scan and debug Rogue and Rogomatic:

Two examples of lexical scanners written in C and lex (flex).

Plus some debugging scripts used to run Rogomatic/Rogue repeatedly while looking for bugs/errors to happen.

SCANNERS:

Two scanners (one for Rogue, one for Rogomatic) written in C and lex (flex). The main motivation for writing these was that deciphervt100.c in Rogomatic was not working. It seemed that Rogomatic was getting a strange character sent to it from Rogue (octal 310). Eventually this led me to the bug in Rogue (now fixed in latest version). While I was at it for Rogue I decided to do one for Rogomatic.

Both can be configured to produce three different formats of output:

Control characters converted to “{” “}” enclosed strings all streamed together (no line breaks)

Each code printed on a different line (useful for sorting via sort -u to see what codes are being put out overall)

Only unrecognized codes and characters printed

DEBUGGING SCRIPTS:

And the debugging scripts/environment I use.

Please note that Debugging 3.0.0 Changes are not backwards compatible with older versions of Rogue or Rogomatic.

You will need versions: rogomatic-debug-r3.0.0, rogomatic-r2.0.1 and rogue5.4.4-ant-r1.1.1 or later.

Also you will need to set the variables: GETROGOMATICPID, GETROGUEPID and export them in your environment when running mainloop.

Debugging 3.0.3 Changes: Mainloop now checks for segfaults from rogue or rogomatic every two minutes. It also checks for the creation of a core file. cmp2runs doesn’t work for larger data sets, but I did change it to run in the current directory (instead of only working in scratch) – it needs revising to avoid clobbering some files or having things go to a /tmp location or something… gdb-pt (pt-rogo-data and pt-rogue-loop) keep altering them to help me track down bugs. pidcrash was changed to use the bash built in test command.