This is an old revision of the document!
Table of Contents
How to Set Up for ICYPC Ladder Competition
- Create
~/icypc
(directory in your home directory) - Make world readable/executable (
chmod 755
) - Create executable shell scripts in
~/icypc
(see the next section for examples):~/icypc/hunter
~/icypc/planter
- etc
- Be sure to make them executable (again,
chmod 755
will do it) - Register program(s) at ladder website: http://pc2.cs.purdue.edu:8000/ladder
A quick way to ensure that your icypc directory and all files are world-readable and (where appropriate) world-executable:
% chmod -R o+rX ~/icypc
This command recursively (-R
) sets all permissions in your ~/icypc
directory and subdirectories to world (“o” for “other”) readable (“r”) and executable (“X”, which sets the execute bit only on directories and files that are already executable).
Note that this command makes everything in your icypc
directory readable, including source code if it is there.
Script Examples
hunter
#!/bin/sh cd /homes/YOUR-LOGIN-ID/icypc /p/java-1.6/bin/java java_example.Hunter
camper
#!/bin/sh cd /homes/YOUR-LOGIN-ID/icypc c++_example/camper
Viewing Instructions
- To view one of your matches in 2D (
NNN
is the match number):
% /homes/cs390cp/bin/view NNN
- To view one of your matches in 3D (
NNN
is the match number):
% /homes/cs390cp/bin/view3d NNN
Note that 3D viewing works in the Linux lab (LWSN B158), but not (currently) in the Solaris lab (LWSN B146).
To Play a "Friendly" Competition with One Another
- Use setup as above.
- Example (with assumed student/player names)…
% java -jar icypc.jar -player pipe 1 /homes/li400/icypc/hunter -player pipe 1 /homes/wzhang/icypc/planter
There is an example “battle” script in /homes/cs390cp/icypc/battle
, which takes four arguments:
% /homes/cs390cp/icypc/battle li400 hunter wzhang planter
Also, see the “hunter” and “camper” scripts in that directory for examples of running Java and C++ competitors. There is also a “twoer” script that uses a two hunter plus two planter strategy.