Package org.jscience.computing.game

This package contains packages to support game implementations.

See:
          Description

Interface Summary
AutoPlay AutoPlay adds AI capabilites to a GamePlay by mapping Player objects to the game roles of a GamePlay.
GameGUI The GameGUI interface is implemented by objects that use the JGamePlay interface to play a game.
GameMove GameMove provides the necessary methods that allow a GamePlay object to handle a game move properly.
GamePlay GamePlay provides all methods needed to play a game.
JGamePlay JGamePlay provides functionality that is used by the GUI based JGameFrame to display the game specific features.
Player The Player ojbect adds Artificial Intelligence to a GamePlay.
 

Class Summary
AbstractGame This class implements the generic behaviour of a game to ease GamePlay implementations.
BookPlayer BookPlayer is a Player wrapper that can significantly improve normal Player performance by predefining move selections.
GameBoardMove A specialized GameMove class suitable for board games to implement moves of pieces from and to positions on a board.
GameBoardPosition GameBoardPosition implements a board position that can be used for various board game implementations.
GameDriver The GameDriver provides an implementation for an AutoPlay.
GameServer A GameServer hosts a GamePlay object that clients can play remotely by connecting to it and following this server's protocol.
GameUtils The class GameUtils provides several algorithms for operating on GamePlay objects.
JDefaultGame JDefaultGame provides a basic wrapper for GamePlay objects for implementing the JGamePlay interface.
JGameFrame JGameFrame implements a generic GUI setup for a JGamePlay.
JPlayerClient a GUI application acting as a client Player in a game played over the network
MoveTemplate MoveTemplate just provides a skeleton implementation for the GameMove interface, so you can focus soley on the game specific properties of the GameMove.
PrisonersDilemmaAgent A simple implementation of an agent that obeys the rules of the prisoner's dilemma.
RandomPlayer RandomPlayer provides a reference implementation of the Player interface.
SocketPlayer SocketPlayer is a wrapper around a standard Player object.
SocketPlayerServer SocketPlayerServer provides the capability of taking network requests from a SocketPlayer.
TemplatePlayer The TemplatePlayer provides a useful skeleton implementation for the Player interface.
 

Exception Summary
CannotPlayGameException An Exception that is thrown if a Player cannot play a given game implementation
GameException thrown when game related exceptions are raised that should be caught
GameRuntimeException The GameRuntimeException provides access to the GamePlay object that is associated to the exception, so that Exception handing code can take advantage of it.
 

Package org.jscience.computing.game Description

This package contains packages to support game implementations.

See also the tutorial available for this package.

The package provides a general framework for implementing different games (or in fact any type of simulation) with minimal effort, since all generic concepts (game players with game tree search capabilities - including intelligent pruning, game boards with positions, undoing and redoing moves, GUI capabilities, etc.) are already pre-implemented; the framework is kept so generic that it actually qualifies as a general automated problem solver. Sub-packages contain reference implementations of real games. The package is very flexible and easily extendable, so it should be usable for just about any effort to program game related functionality.

Algorithms available for analyzing game trees or to support better AI for Player implementations include MinMax, AlphaBeta, breadth-first-search, depth-first-search and best-first-search.

This package also includes classes that allow to play games with multiple users remotely over the Internet - with other human players, remote AI Player objects or a mix of the two. An included multi-threaded GameServer is based on the functionality provided by the org.jscience.computing.game.net package of this framework.

The game logic is kept separate from the way the visualization is implemented. By convention,  all classes that contain GUI elements (from either java.awt or javax.swing) begin with a 'J', all other classes contain only game logic and can be used in any context. This convention is also kept in the sub-packages.