1f7ff56204
Updated build for Java 8. Version 6 is no longer supported as of Java SE JDK 25.
master
Woody Folsom2026-02-10 11:33:51 -05:00
b8d9480ae7
Added license and README.txt.
Woody Folsom
2012-05-02 08:30:14 -04:00
3ba0db6ebd
All MoveGenerators default to 1 move lookahead. Made MoveGenerators protected for unit testing. Added unit test for some analysis of MoveGenerator speeds. Fixed MDP to consider all states where #turns = maxTurns terminal.
Woody Folsom
2012-05-01 22:24:02 -04:00
924780baaf
Substantially improved performance of Board.isLegal(). No longer a static method. AlphaBeta is now playable with 4-move lookahead (although slow).
Woody Folsom
2012-05-01 09:38:32 -04:00
48915071d4
Now allows a leading - character for command-line arguments. The presence or absence of this character a has not effect.
Woody Folsom
2012-05-01 09:11:39 -04:00
490d3d0bf6
Fixed various errors when target = 0.
Woody Folsom
2012-04-30 19:53:46 -04:00
f4ed883d63
Removed references to log4j.
Woody Folsom
2012-04-30 19:40:43 -04:00
a9fbdfb50e
Merge branch 'master' of woodyfolsom.net:/opt/git/cs8803p4
Marshall
2012-04-30 19:11:48 -04:00
d03b4443f6
Fix for double boards when the player starts the game by clicking 'play' instead of pressing <Enter>.
Woody Folsom
2012-04-30 18:35:53 -04:00
f81db19586
- Test PlayerModel.dat file should not be versioned, I don't think...
Marshall
2012-04-30 17:59:44 -04:00
8f92ae65d8
Fixed unit tests, changed MDP generation to more reasonably seek the goal state, avoiding premature end of game. Removed unused google-code classes. Regenerate policy when AdaptiveComPlayer.setTarget() is called.
Woody Folsom
2012-04-30 17:37:37 -04:00
3800436cd9
Merge branch 'master' of woodyfolsom.net:/opt/git/cs8803p4
Marshall
2012-04-30 13:41:10 -04:00
3dfecec104
- Tiny update to CountingPlayer.java.
Marshall
2012-04-30 13:40:39 -04:00
d0ee1e647b
Implemented agent which chooses to play winning, losing or random moves by solving a simplified MDP model of the game using policy iteration. Portions of MDP/solver code by Ciaran O'Reilly and Ravi Mohan used under MIT license.
Woody Folsom
2012-04-30 13:35:40 -04:00
0724d44ec4
- Created a new ComPlayer. It targets a particular score, and does it pretty well. It does this by counting the number of empty spaces and the number of empty spaces that can potentially be created by removing tiles then either playing to block or playing to extend the game. - Created DumpResults.java, which simply outputs all scores in a player model so that they can be graphed.
Marshall
2012-04-30 05:18:02 -04:00
8de42a3562
- I created a ComboPlayer.java agent. It sucks and doesn't really work, but I created it. Now I'm putting it down to work on other things.
Marshall
2012-04-29 20:54:34 -04:00
e012f17b33
- Changed the rules. Now tiles can only be placed next to existing tiles. Unless the board is empty.
Marshall
2012-04-29 17:11:11 -04:00
c06f7ab38e
Score increments when the player places a tile, also increments without the visible delay.
Woody Folsom
2012-04-29 15:39:47 -04:00
0721922990
class left out of previous commit.
Woody Folsom
2012-04-29 14:59:58 -04:00
21e5d89447
Implemented naive Monte Carlo move generator (simulates 10 random moves for 3 turns by each player). Consequently, it performs strictly worse than Alpha-Beta, but usually avoids setting players up for an easy capture, unlike Alpha-Beta.
Woody Folsom
2012-04-29 14:59:25 -04:00
fe341545aa
Merge branch 'master' of woodyfolsom.net:/opt/git/cs8803p4
Marshall
2012-04-29 14:20:13 -04:00
60a842d729
- Reorganized the constructors in Move.java. - Made the getBoardState method in Referee.java static. - Created NeuralNetworkPlayer.java, though I don't know how to make the computer use it. - Updated the Player interface to include passing the PlayerModel. Most of the current com agents ignore the data, but it is now available. - Updated the train function in PlayerModel.java.
Marshall
2012-04-29 14:19:10 -04:00
744ceb02f7
Fixed index out of bounds. Implemented CellPointer equals, hashcode.
Woody Folsom
2012-04-29 13:40:27 -04:00
a756aa242d
- PlayerModel.java now returns the full array of output nodes instead of just their activation states. This exposes their strengths.
Marshall
2012-04-29 12:49:08 -04:00
1eebacf963
- Diagonal lines are no longer removed.
Marshall
2012-04-29 12:45:49 -04:00
c53ff75ea4
Added configurable computer player - use 'com=random', 'com=minimax' etc as cmd-line args. Default is AlphaBeta. Updated ActionListener for UserChooserFrame so that selecting from the list (or typing a new name and pressing RETURN) also triggers the action. Added the player and computer algorithm names to the title bar e.g. "Bob vs. Alpha-Beta".
Woody Folsom
2012-04-29 10:18:15 -04:00
15ed56134e
- Implemented multiple users, including a selection dialog and automatic preference saving and loading. - Integrated the ANN with the game. The network now predicts a user move, completely ignores it, and trains itself on the players actual move. This integration also included implementing two new functions. The first translates a board state to a boolean array to correspond with input nodes. The second translates a move to a boolean array to correspond with output nodes.
Marshall
2012-04-29 03:22:19 -04:00
dc11e2c48b
- Implemented saving and loading of a player model. High scores are now persistent, though only for one user. - Created a JUnit test class to test the serialization. Should be useful for later tests.
Marshall
2012-04-28 23:01:36 -04:00
a6af6df132
- Reorganized packages so that the computer agents are inside the model package. - Added support for the player model inside Referee.java; high scores should now persist over a single execution of the program. - Refactored PlayerModel.java to support game logging. All games are now logged so that we can track overall progress. - Added scaffolding to allow saving and importing of PlayerModel.java. It is not yet functional, but it will be with two function implementations and then the appropriate calls.
Marshall
2012-04-28 19:18:28 -04:00
1a4c6d865b
- Finished HighScoreDialog.java. Now the player can play the game repeatedly.
Marshall
2012-04-28 16:24:45 -04:00
24096b50a8
- Updated the Node interface and its implementations to include a strength() function. This is a double value between 0 and 1 representing the percent activation. - Updated the PlayerModel to fix a bug in the high score tracking. - Created HighScoreDialog.java, which displays the high scores from a PlayerModel. In the future, it will have a "New Game" button so that it can be used to transition between games.
Marshall
2012-04-26 13:04:41 -04:00
0cfe26faf1
- Created a GameGoal class to encapsulate the expected computer behavior/target score for a game. The PlayerModel.java function getTargetScore() now returns a GameGoal object.
Marshall
2012-04-26 12:08:17 -04:00
b8a13a87d0
Merge branch 'master' of woodyfolsom.net:/opt/git/cs8803p4
Marshall
2012-04-26 11:18:06 -04:00
b87f58cb31
Minor changes to support debugging Alpha-Beta move generator.
Woody Folsom
2012-04-25 09:27:52 -04:00
f19c09b573
-PlayerModel classes, including a function to get the target score for a player's game and a neural network to predict a player's moves.
Marshall
2012-04-19 21:05:59 -04:00
d9ec72d0fb
Alpha-Beta move generator can look 2 plays (4 plies) ahead on a 4x4 board and blocks every possible attempt by the player to connect 3. It should be possible to play on larger boards when the computers 'move' is changed from playing a tile to picking the player's next available color.
Woody Folsom
2012-04-14 15:36:02 -04:00
74b8eb4622
Revampled MainFrame layout to improve appearance/usability when the number of tiles is very large or small. Fixed instantiation where a new MouseListener was used to each tile - now only one is used for all Tiles. Fixed issue where the MouseListener was being added to each tile twice.
Woody Folsom
2012-04-14 12:02:17 -04:00
9619f9a96d
Incremental updates. Work in progress to augment Board, Referee, add score for computer player, implement Monte-Carlo simulation. Renamed Player implementations and changed Player to interface, with the goal of using abstraction to make the human and computer interactions with the game identical for ease of simulation.
Woody Folsom
2012-04-08 17:25:10 -04:00
e0f42531e7
Replaced having 1 MouseListener per Tile JLabel which a single listener which asks the event's associated component for its row, column. This isn't ideal, but is preferable to putting this information in each of rows x columns different mouse listeners. Also added a title to the MainFrame.
Woody Folsom
2012-04-04 17:31:50 -04:00
b8df412740
Removed use of Refreshable and replaced with several methods which update the GUI using SwingUtilities.invokeLater(). While not as clean as using ChangeListener, it completely decouples the Model and View aspects, and also avoids the need to manually paint() a hierarchy of components (a task best handled by Swing/AWT).
Woody Folsom
2012-04-04 17:15:21 -04:00
0f616a3cc6
Continuing gradual process of collecting state from various GUI components and handlers and aggregating it in PlayerController. Removed references to Refree from some handlers, replacing them with direct use of PlayerController (Law of Demeter).
Woody Folsom
2012-04-04 15:31:27 -04:00
0522f416e4
Correcting minor classpath issue which prevented running in Eclipse - was res/img, should have been res.
Woody Folsom
2012-04-04 13:44:32 -04:00
cffbc2c592
Build artifact dirs (docs, dist, bin) are now excluded from source control.
Woody Folsom
2012-04-02 13:57:50 -04:00
c8cdc1fcf8
Intermediate commit to remove Eclipse build artifacts (class files) from source control.
Woody Folsom
2012-04-02 13:57:26 -04:00
02c4986c30
App can now be built using Ant and run from the JAR file. Note: this requires adding the res/lib folder to the classpath in order to run in Eclipse (included in this commit). Another commit will follow to remove build artifacts from git.
Woody Folsom
2012-04-02 13:54:55 -04:00
521fac6e08
-The rest of the game engine. I screwed up the commit last time.
Marshall
2012-03-31 14:18:08 -04:00
2954041e89
Initial game engine.
Marshall
2012-03-31 14:15:50 -04:00
ccf8038f05
Merge branch 'master' of woodyfolsom.net:/opt/git/cs8803p3
unknown
2012-03-31 14:05:59 -04:00
952ccdc23b
- Update the ProfileMatcher mapping.
Marshall
2012-03-18 19:01:08 -04:00
d5b8e0b85e
Very rough draft of write-up (not proof-read).
Woody Folsom
2012-03-18 18:46:30 -04:00
18643d17e4
Fixed NPE when the default player.txt does not exist. Fixed bug when requesting PowerUp component of invalid length. Change default lives to 1.
Woody Folsom
2012-03-18 18:14:11 -04:00
c2465821f3
Work in progress.
Woody Folsom
2012-03-18 15:01:16 -04:00
1f1f23a6c3
- Greatly improved the challenge/reward probability function and usage. Removed some unnecessary fields and resorted the members of PCGLevel to make it easier to read.
Marshall
2012-03-18 14:51:27 -04:00
5ae5edd961
Merge branch 'master' of woodyfolsom.net:/opt/git/cs8803p3
Marshall
2012-03-18 13:43:23 -04:00
bc45062ad8
- Implemented the reward weighting. - Fixed a balance issue with the blocks and coins on straight stretches of even length.
Marshall
2012-03-18 13:42:59 -04:00
d5b1bda7e1
Grammar, now with pipes!
Woody Folsom
2012-03-18 13:23:51 -04:00
dc6fe7e493
- Added the notion of "challenge type" difficulty weighting. It doesn't do anything yet, but the scaffolding is there. Create a set of enums to aid that. - Added more precise platform number randomizing in the platform jump challenge. - Removed the hard-coded difficulty in the testing generation branch.
Marshall
2012-03-18 13:01:51 -04:00
554e9af319
Fixed manifest and build file so that mario can be built and run on the command-line.
Woody Folsom
2012-03-18 12:27:29 -04:00
7b6baaa538
Basic FitnessEvaluator tries 10x to generate a level containing between 8 and 16 level components.
Woody Folsom
2012-03-18 11:33:18 -04:00
d6516388ad
Now with file-based level grammar.
Woody Folsom
2012-03-18 10:56:25 -04:00
b431d5efeb
Functional context-free grammar! Worked first time! Well... almost.
Woody Folsom
2012-03-18 08:09:53 -04:00
9ce8685b74
Merge branch 'master' of woodyfolsom.net:/opt/git/cs8803p3
Marshall
2012-03-18 05:33:57 -04:00
f0b7487476
This patch has a TON of changes. I updated almost every challenge and added some new ones. I think it represents a good suite of possibilities. Check it out.
Marshall
2012-03-18 05:25:33 -04:00
7d747765ef
Implemented stochastic grammar. Work in progress.
Woody Folsom
2012-03-17 22:23:38 -04:00
ac968b5b7f
- Fixed another platform jumping impossibility bug. - Added monsters to platform jumping. - Difficulty is now hard-coded to six.
Marshall
2012-03-17 21:55:00 -04:00
f179f2daa5
- Adjusted difficulty formula for bowling challenge. - Added difficulty-weighted maze monsters. - Note: this build has a hard-coded difficulty of 10.
Marshall
2012-03-17 21:15:44 -04:00
63b89b053f
- Fixed an off-by-one error in the bowling challenge.
Marshall
2012-03-17 20:49:55 -04:00
ce8cb49029
Merge branch 'master' of woodyfolsom.net:/opt/git/cs8803p3
Marshall
2012-03-17 20:44:41 -04:00
109c2d099a
Rete-based rule system (Drools) correctly fires the appropriate actions when Player's Profile meets certain criteria, based on the rules in rules/LevelTunerRules.drl.
Woody Folsom
2012-03-17 18:08:56 -04:00
2d7507632d
Added the LemmingTrap challenge.
Marshall
2012-03-17 17:47:40 -04:00