Objective
Each student is to design and build a Java system which attempts to
accumulate a maximum amount of wealth through communications with other
student systems and a monitor system maintained by the instructor and an
aid. On midnight of the last day of class, participating systems will
be ranked according to total accumulated wealth and results posted.
General Description
Wealth is measured in units called Rupyulars. Wealth is distributed by the
monitor daily to participating systems as raw resources (each having a unit
value in Rupyulars) or Rupyulars themselves. There are six kinds of
resources and three kinds of products that may be manufactured from the
resources. The resources are: oil, steel, plastic, copper, glass, and
rubber. The products are: weapons, computers, and vehicles. A system's
wealth can be increased (or perhaps decreased) by
-
Constructing finished products from the raw resources,
-
Making deals with other systems to exchange reources, products, or
Rupyulars,
-
Stealing items of wealth from other systems,
-
Making war with another system.
Each item, resource or product, has a per unit value in Rupyulars. That
value changes by the minute and is governed by legitimate transactions
between systems. Resources may be exchanged for other resources or
Rupyulars by agreement between two parties. In this case there is no
obligation to fix any particular exchange value for any item, or even to
accept an offer. Resources are used in certain fixed proportions to create
units of finished products. Finished products will typically have more
value than the raw materials used to construct them because they can be used
to acquire additional wealth. Weapons can be used to wage war on other
systems. Computers can be used to unlock secrets about particular systems
such as how many weapons an adversary possesses. Vehicles are needed to
deploy weapons and computers. The use of weapons, vehicles, and computers
requires the consumption of oil. Raw resources cannot be recovered from a
finished product.
Monitor
The monitor is maintained by the instructor and an aid and has numerous
important functions as follows:
-
It keeps track of who is alive (registered).
-
It keeps track of who owns what. Its data base of wealth distribution
is official. It keeps track of legitimate transactions and determines
the winner and spoils in case of war.
-
It approves all communications. One reason for this is to slow down
transaction rates to prevent network overload. A second reason is to
facilitate the principle that a system owning relatively few computers will
be allowed to communicate less frequently than a system owning many
computers.
-
Unwanted finished products that have no buyers may be sold to the monitor.
Finished products may also be purchased from the monitor. Prices, in such
cases, are determined soley by the monitor. Raw resources cannot be
purchased from the monitor.
-
It may be consulted to determine current market value and amount of
resources in circulation.
-
A system may attempt to read information about another system through the
monitor (an attempt may also be made to get a dim-witted system to divulge
such information, independent of the monitor). The more computers a system
has, the better chance it has of obtaining secrets. The more security a
system has, the better chance it has of protecting its secrets. A system may
"listen" on the monitor's port for transactions containing authenticating
tokens and may attempt to "crack" those tokens to impersonate another
system.
The monitor will always be listening on port 7777 of boole.ececs.uc.edu.
Try it now! You can use netscape (http://boole.ececs.uc.edu:7777) or
build your own program to test it. Transactions with the monitor will
always involve a handshake followed by a single line including a
command followed by a list of arguments. Details of the handshake and
a list of commands are forthcoming.
Student Systems
Student systems do not always have to be running. When they are running,
they will operate from a port on an ececs.uc.edu address. Allowed
port numbers are forthcoming. Anyone not using an authorized port number
will face a loss of wealth. Every time a system starts it must register
with the monitor. A system must also inform the monitor when it is
going off-line. This information is communicated by means of commands
issued to the monitor. A system may be started on a different machine
and a different port each time it goes on-line. However, there should
only be system per student at a time. This is enforced by the registration
process: the monitor only allows transactions with the most recently
registered port and address for a given user.
All transactions should be encrypted using public-key encryption. If
not, they could be intercepted by a "sniffer" and the contents used
to fool the monitor into moving wealth around from one system to another
or to determine resources, products, weapons, etc.
War Rules
The following are the rules for waging, winning, and losing a war.
-
System A declares war on System B by making a request through the monitor.
The monitor checks that System B is on-line. If so, approval is granted
to System A and System B is notified.
-
A war consists of a series of one or more battles. System A and System B
must determine how many units of weapons, vehicles, and oil is to be used for
a battle and send that information to the monitor. The monitor determines
losses and reports the results to both parties. Neither system can go
off-line once a war begins. Doing so results in the forfeit and transfer of
wealth to the opponent.
-
Battles continue until one side gives up. Between battles, a chance is
given for both sides to negotiate a settlement. If a settlement is reached,
the agreed upon transfer of wealth is reported to the monitor. Otherwise,
an unconditional surrender occurs and 50% of the loser's assets are
transfered to the victor's. If one side loses all its weapons or does not
have enough oil or vehicles to support any weapons, an unconditional
surrender is declared.