~/icypc
(directory in your home directory)chmod 755
)~/icypc
(see the next section for examples):~/icypc/hunter
~/icypc/planter
-
or .
characters in your script names (just alphanumerics).chmod 755
will do it)~/icypc
are competitor scripts.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.
You might find it useful to create subdirectories in ~/icypc
(or elsewhere) to contain your source code and a working copy of your binaries (e.g., .class files for Java). Then, when you've sufficiently debugged your competitor and want to take on other players on the ladder, copy your binaries to the ~/icypc
directory for execution by your competitor script.
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
You can view a replay of any ladder match. (Trace files are kept in /homes/cs390cp/traces
.)
NNN
is the match number):% /homes/cs390cp/bin/view2d NNN
NNN
is the match number):% /homes/cs390cp/bin/view3d NNN
% /homes/cs390cp/bin/viewso NNN
% /homes/cs390cp/bin/viewse NNN
% 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/bin/battle
, which takes four arguments:
% /homes/cs390cp/bin/battle li400 hunter wzhang planter
Also, see the “hunter” and “camper” scripts in /homes/jtk/icypc for examples of running Java and C++ competitors. There is also a “twoer” script that uses a two hunter plus two planter strategy.