Downloads
Source
Source code downloads are available below. For build instructions refer to the
FAQ.
The strategy game framework and the associated code available on this site is Copyright © Michael Patricios. All the code is open source and released under the
GNU General Public License, as published by the
Free Software Foundation.
Strategy game source code archive 2.1
Released: 21 December 2007
Download as zip archive:
Or checkout from subversion:
-
svn checkout http://lurgee-sgf.googlecode.com/svn/tags/rel2.1/ lurgee-sgf
Contents:
- Strategy game framework
- Common AWT, Applet and Console classes
- Reversi console application and applet
- Connect-four console application and applet
Release notes:
This release introduces iterative deepening searches and the killer heuristic for move ranking and associated changes to accommodate these. Details follow.
-
The code is now Java 5 compliant.
-
Renamed some classes to correctly reflect their function.
-
Introduced the
Position marker interface and changed the Move interface to just be a marker interface.
-
Introduced the
GameContext class as a single point for maintaining the game context, including required factories for generating game entities.
-
Ranking of moves now does not need to be done explicitly by specialisations of the
AbstractBoard class, but is handled by the MoveList class provided by the GameContext. This also handles 'randomness' in the selection of equally-good moves, rather than relying on the move rankers to do this artificially through the addition of a small random amount.
-
Added some standardised tests for assessing relative performance.
-
Improved the reversi evaluator.
-
Completely changed the connect-four evaluator, with associated changes to
Connect4Board. Now using a more quantitative approach to scoring the board rather than relying on some rather shaky rules.
-
Added the
IterativeSearcher and KillerHeuristicMoveRanker classes, which when used together allow for tree searches with fewer evaluations. Searches with IterativeSearcher can be ended after a specified number of evaluations rather than searching to a fixed depth.
-
Reversi and connect-four applet now use negascout with iterative deepening rather than negascout with a fixed depth.
-
Multiple listeners can be added to the searcher classes rather than just one.
-
Applets log some interesting information to the Java console.
-
Code cleanup and refactoring.
Known issues:
- Audio does not work in Opera - this may be an Opera issue.
Strategy game source code archive 2.0
Released: 29 July 2007
Release notes:
This release is the result of a major refactor. Details follow.
-
Added connect-four implementation, with console application and applet.
-
Some changes to the strategy game framework to address issues shown up by the connect-four implementation and to tighten up the domain model - in particular, the board now has knowledge of the player to go, so the player is not passed around as an argument quite so much.
-
Added further tests across the code base to tighten up regression tests.
-
Created two new packages:
net.lurgee.common.console and net.lurgee.common.applet, which contain generic abstracted functionality (originally in the reversi console application and applet) for implementing console applications and applets using the strategy game framework.
-
Updated reversi applet GUI to add indicator of last piece played and to use new event-driven approach built into the common applet classes.
Strategy game source code archive 1.2
Released: 25 February 2007
Release notes:
This release includes some bugfixes, added functionality and some refinements. Details follow.
- Strategy game framework:
- Added
MoveRanker to delegate ranking of moves to.
- Added
NegascoutSearcher to do negascout tree searches.
- Refactored
NegamaxSearcher to allow NegascoutSearcher to extend it.
- Reversi common module:
- Removed
ReversiConsts class and created Colour and Direction classes.
- Added
ReversiMoveRanker for ranking moves - this was previously done directly in ReversiBoard.
- Fixed a fairly serious bug in
compare method in ReversiBoard, where counts were not being reset, which was affecting evaluation of board positions.
- Fixed a bug in
ReversiEvaluator, which was using the wrong count for short-cutting some evaluations.
- Added an
equals method to ReversiBoard, needed by unit tests.
- Added real mobility differential to
ReversiEvaluator.
- Tweaked factors in
ReversiEvaluator to make improve game play.
- Reversi console application:
- Added option to select negamax or negascout searcher for each player.
- Updated
AlternativeEvaluator with same changes as ReversiEvaluator.
- Refactored and tidied up
Reversi class.
- Reversi applet:
- Changed search depths for levels 1 - 6 from (2, 4, 5, 6, 7, 8) to (2, 3, 4, 5, 6, 7).
- Changed searcher to negascout rather than negamax.
Strategy game source code archive 1.1
Released: 15 April 2006
Release notes:
- Strategy game framework:
- Changed the way in which no-move situations are managed - there is now a
byeAllowed flag on the searcher, which indicates that if a user cannot move play reverts to the other player.
Strategy game source code archive 1.0
Released: 09 April 2006
Release notes: