icypc_instructions

This is an old revision of the document!


How to Set Up for ICYPC Ladder Competition

  1. Create ~/icypc (directory in your home directory)
  2. Make world readable/executable (chmod 755)
  3. Create executable shell scripts in ~/icypc (see the next section for examples):
    • ~/icypc/hunter
    • ~/icypc/planter
    • etc
  4. Be sure to make them executable (again, chmod 755 will do it)
  5. 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

  1. Use setup as above.
  2. 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.

icypc_instructions.1289510778.txt.gz · Last modified: 2010/11/11 13:26 by jtkorb