mchristos / checkers Goto Github PK
View Code? Open in Web Editor NEWA checkers game with AI written in Java/Swing
A checkers game with AI written in Java/Swing
The game logic remains same, did not change data structures. Before match starts, constant memory is around 100MB. (Both 32 & 64bit java). As match goes on, the RAM usage spikes up! ⬆️
The RAM usage on 64 bit Java (tested on all major OS, and Java 8 latest and 17) is very high! Hovering around 260-390MB during single match. You may want to investigate this. Maybe too much copying of Heavy objects, eg BoardState
@Mchristos When playing against AI, after the AI did a double jump, i got NPE in the console as follows. it seems it is coming from line 192 of BoardState. I had not modified the original code.
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot invoke "org.davistiba.game.Piece.getPlayer()" because the return value of "org.davistiba.game.BoardState.getPiece(int)" is null
at org.davistiba.game.BoardState.getSuccessors(BoardState.java:192)
at org.davistiba.game.BoardState.getSuccessors(BoardState.java:170)
at org.davistiba.game.Game.getValidMoves(Game.java:79)
The game logic remains same, did not change any data structures. Before match starts, constant memory is around 100MB. (Both 32 & 64bit java). Once start moving the pieces and match goes on, the RAM usage spikes upto 600 MB and hovers around 400~500MB throughout the match.
Tested on Windows 10, MacOS Sonoma. JDK 17.0.6 and JDK8u361
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.