As discussed in our main Gemini Harness document, the Java-based Gemini Harness application can be used to feed GOHR rule sets to one of the LLM models of Google Gemini, to see how well it can guess the rules.
Our project staff at Rutgers can ssh to our server to run that application there. Collaborators elsewhere would need to install this application on their own computers if they want to try it out. One way to do it is to pull the Rule Game Server's source code from the GitHub repository, and build the application from the source code, along with the rest of the Game Server (See the Setup instructions). However, if you just want to try it out, this is needlessly complex; this document describes a way to install the Gemini Harness app by downloading a zip file with already compiled code (JAR files).
These instructions assume that you will download and use the application on a Linux, MacOS, or UNIX computer. MS Windows users may need to make some minor adjustments (mostly, changes to the shell scripts used to run the app).
You need to have a Java Runtime Environment (JRE) (i.e. the system for running pre-compiled Java code) installed on your machine. Type which java on your console to see if you have one already; if you don't, you can get one from Oracle (How do I install Java?) or from OpenJDK (How to download and install prebuilt OpenJDK packages).
Our shell scripts are written in csh, so your system should have csh installed. (Most Linux / UNIX system already have, and if yours don't, you should be able to easily install it). Alternatively, you can re-write the scripts for your favorite shell (sh, bash, ksh, whatever) or convert them to MS Windows batch files.
The necessary JAR files and source code are packed into a zip file named captive.zip, or something similar (the name suffixed with a version number and/or date).
Download a recent version of that file from our site's Download Area. Choose a file with a name that indicates it's the most recent version, e.g. captive-8.049.zip, or whatever you see.
From the same directory, download another zip file, called rules.zip (possibly, suffixed with a version number). It contains some sample rule files.
Choose a directory in which you will install the application. Here, as an example, we assume it will be ~/w2020. Let's call that location your "main Gemini directory".
Unzip the two zip files in your main Gemini directory:
cd
mkdir w2020
cd ~/w2020
unzip ~/captive-8.049.zip
unzip ~/rules.zip
This will create the directories ~/w2020/game, with all the CGS code in it, and
~/w2020/game-data, with some sample data files.
To be able to access the Gemini API, you must have a Gemini API key. As of February 2026, it can be obtained by creating an account at the Google AI Studio, creating a project in that studio, and then getting a key for that project. Google AI Studio.
Put your newly obtained key into the file named gemini-api-key.txt in your main Gemini directory.
Once you have a project with a key, you can view your daily request limit, and how much of it has been used, at the Usage page, under the "Rate Limit" tab.
A detailed discussion of the app can be found in our Gemini page. One thin to keep in mind is that out of the two modes of interacting with the Gemini LLM -- the "play mode" and the "prepared-episodes mode" -- only the latter is affordable under these days' quotas (which are on the order of 20 RPD (requests per day)).
The main script is game/scripts/gemini.sh; it is discussed in that document.
For your convenience, the script game/gemini-sample-scripts/prepared.sh shows you how to use gemini.sh in the prepared-episodes mode. Before using this script, you may choose to edit some of the shell script variables in it:
set main=~/w2020 -- the location of your main enini directory
set model=gemini-2.5-flash -- the Gemini model to use. At present (Feb 2026), the two models available to free-tier users are gemini-2.5-flash and gemini-3-flash-preview. Paid-tier users can also use gemini-3-pro.
set p=5 -- how many prepared episodes to generate and send to the bot
set ins=$data/gemini/system-prepared-03.txt -- the system instructions file, explaining the "meta-rules" to the bot. This one is taken from the directory game-data/gemini; you can write your own!
The script has a for loop, looping over several names of rule sets. For each rule set named in the for loop, it takes the rule set file from game-data/rules/FDCL/basic, and creates n random episodes played with that rule set, to be sent to the bot as its training set. You can change the line
set rule=$data/rules/FDCL/basic/$x.txtif you want to use rule set files from some other directory.
You can run this script with the nohup command:
nohup ./prepared.sh >& tmp.logYou can check whether it's still running with the
jobscommand.
Once it has completed, it should produce a log file and csv file for every rule set in the "for" loop, e.g.
% ls -lt rw-rw-r-- 1 vmenkov vmenkov 389 Feb 7 14:14 colOrdL1_BRKY-260207-1410.csv -rw-rw-r-- 1 vmenkov vmenkov 93173 Feb 7 14:14 prepared-5-colOrdL1_BRKY-260207-1410.txtYou can see the summary line in each file with
% grep -H Overall prepared-*.txt prepared-5-colOrdL1_BRKY-260207-1410.txt:Overall, cleared boards: 0/5, good moves: 5/45