Page 1 of 1
RelaxChess 4 Beta version released
Posted: Thu Aug 24, 2017 1:11 pm
by Richard1964
RelaxChess 4 (Beta) is released
The new functionality includes
- 2 custom themes ,you just select your image file and all styles of controls will be generated so they perfectly match with your image
(Here 2 examples how your RelaxChess game can look like
1)
http://goo.gl/bB9bTW
2)
http://goo.gl/ySf712
- RelaxChess engine supports now many bratko-kopec tests, it is stronger and still very fast
- Scaling is supported up to 8 processors
- Various other engine improvements
The full functionality game is for some period free for download
Download link
http://goo.gl/GCMbbp
Re: RelaxChess 4 Beta version released
Posted: Sat Aug 26, 2017 11:18 am
by Richard1964
You will need a license number for the game QLVZZYZUVTYV1503739620706
Re: RelaxChess 4 Beta version released
Posted: Thu Sep 07, 2017 1:44 pm
by Richard1964
Behind the scene ...
Every change in the chess engine is being testing using regression and integration tests, currently there are 116 tests every test has its own scenario. To load a chess game RelaxChess supports EPD and its own XML format. The game in EPD format must be converted first to XML format ((not available yet from RelaxChess GUI). Testing game scenarios the game is being loaded and depending of the configuartion checked against best move(s). This is done in batch mode, here for curious ones a piece of code from the RelaxChess test part.
public boolean setupClientsTest() {
String clientId = "Rysiek";
boolean passed = true;
Map<String, List<String>> units = null;
Object[] tests = new Object[100];
Object[] keys = new Object[100];
try {
strategy = new WowChessStrategy("c:\\Users\\Richard\\AppData\\Local\\RelaxChess\\log.txt", null, true);
strategy.removeAllPieces(clientId, true);
strategy.removeClient(clientId, true);
strategy.setClientType("remote");
strategy.registerClient(clientId);
strategy.setMode(clientId, ChessUtils.AUTO_MODE);
strategy.setGameLevel(clientId, ChessUtils.ADVANCED_LEVEL);
units = createUnitTests();
tests = units.values().toArray();
ArrayList<String>[] tests2 = Arrays.copyOf(tests, tests.length, ArrayList[].class);
keys = units.keySet().toArray();
for (int i = 0; i < keys.length; i++) {
passed = performTest(keys.toString(), (ArrayList<String>) tests2,
Boolean.parseBoolean(reverse.get(i).toString()),
Integer.parseInt(gameLevels.get(i).toString()));
System.out.println(keys.toString() + " Test: " + (passed ? "Passed" : "Failed"));
reset();
}
} catch (Exception e) {
e.printStackTrace();
strategy.removeAllPieces(clientId, true);
strategy.removeClient(clientId, true);
}
return passed;
}
public void loadChessGame(String fileName) {
String document = null;
boolean computerPiece = false;
int position = 0;
int color = -1;
int newChar = 0;
FileReader reader = null;
List<ChessPiece> chessPieces = new ArrayList<ChessPiece>();
List<String> chessPiecesValues = null;
List<String> computerPieceAttributes = null;
List<String> colorAttributes = null;
List<String> positionAttributes = null;
StringBuffer redGame = new StringBuffer();
ChessPiece piece = null;
try {
reader = new FileReader(fileName);
while ((newChar = reader.read()) != -1) {
redGame.append((char) newChar);
}
document = redGame.toString();
chessPiecesValues = ChessUtils.getElementValues(document, "chessPiece");
computerPieceAttributes = ChessUtils.getAttributeValues(document, "computerPiece");
colorAttributes = ChessUtils.getAttributeValues(document, "color");
positionAttributes = ChessUtils.getAttributeValues(document, "position");
for (int i = 0; i < chessPiecesValues.size(); i++) {
computerPiece = (Boolean.parseBoolean(computerPieceAttributes.get(i).toString()));
color = Integer.parseInt(colorAttributes.get(i).toString());
position = Integer.parseInt(positionAttributes.get(i).toString());
if (chessPiecesValues.get(i).toString().contains(ChessUtils.BISHOP)) {
piece = new ChessBishop(position, color,
color == 0 ? ChessUtils.bishopWhite : ChessUtils.bishopBlack, null, getClientId());
piece.setComputerPiece(computerPiece);
} else if (chessPiecesValues.get(i).toString().contains(ChessUtils.PAWN)) {
piece = new ChessPawn(position, color, color == 0 ? ChessUtils.pawnWhite : ChessUtils.pawnBlack,
null, getClientId());
piece.setComputerPiece(computerPiece);
} else if (chessPiecesValues.get(i).toString().contains(ChessUtils.KNIGHT)) {