Commit Graph

296 Commits

Author SHA1 Message Date
Anduin Xue ad977ed74f Merge branch 'users/nugetninja/evergreen' into 'master'
Auto dependencies upgrade by bot.

See merge request aiursoft/chessserver!73
2024-08-07 06:00:44 +00:00
Nuget Ninja 4405b0da39 Auto csproj fix and update by bot. 2024-08-07 05:01:13 +00:00
Anduin Xue 916792bbb7 Show verbose log for npm install for easier debugging. 2024-08-01 12:32:28 +00:00
Anduin Xue 09c703af7e Merge branch 'users/nugetninja/evergreen' into 'master'
Auto dependencies upgrade by bot.

See merge request aiursoft/chessserver!72
2024-07-31 06:01:06 +00:00
Nuget Ninja dc2680d124 Auto csproj fix and update by bot. 2024-07-31 05:01:00 +00:00
Anduin Xue 603ee417db Merge branch 'users/nugetninja/evergreen' into 'master'
Auto dependencies upgrade by bot.

See merge request aiursoft/chessserver!71
2024-07-18 06:00:39 +00:00
Nuget Ninja 88d35442f4 Auto csproj fix and update by bot. 2024-07-18 05:01:22 +00:00
Anduin Xue d8d0a44a79 Merge branch 'master' of ssh://gitlab.aiursoft.cn:2202/aiursoft/chessserver 2024-07-16 06:08:16 +00:00
Anduin Xue 378da184e0 Use Aiursoft's own npm registry. 2024-07-16 06:08:15 +00:00
Anduin Xue 61a2275a7d Merge branch 'users/nugetninja/evergreen' into 'master'
Auto dependencies upgrade by bot.

See merge request aiursoft/chessserver!70
2024-07-08 06:01:19 +00:00
Nuget Ninja 48128e9e08 Auto csproj fix and update by bot. 2024-07-08 05:01:03 +00:00
Anduin Xue 3ab22373ff Fix a typo with Dockerfile AS. 2024-07-07 14:31:34 +00:00
Anduin Xue 7d32de3d12 Replace as to AS to unify dockerfile grammar. 2024-07-07 14:25:17 +00:00
Anduin Xue 4d6033f73f Update difficulty handling in ChessEngine
The difficulty handling logic has been modified to better determine when to use the best move in the ChessEngine class. A new method called ShouldUseBestMove(int difficulty) has been added to provide a probabilistic approach towards choosing the best move based on the provided difficulty level.
2024-07-06 09:18:18 +00:00
xuef e780e7af7e Use new alpha. 2024-07-06 05:05:20 +00:00
dvorak chen 489c532128 Merge branch 'master' into 'master'
refactor: play sound when moved

See merge request aiursoft/chessserver!69
2024-07-06 04:43:22 +00:00
dvorakchen 554e5918e8 refactor: play sound when moved 2024-07-06 12:36:48 +08:00
dvorak chen 2bb7a1e4be Merge branch 'master' into 'master'
feat: play sound while piece moved

See merge request aiursoft/chessserver!68
2024-07-05 14:26:14 +00:00
dvorakchen 3dee08b268 feat: play sound while piece moved 2024-07-05 22:24:15 +08:00
dvorak chen bbdb775ee0 Merge branch 'master' into 'master'
feat: red highlight in check

See merge request aiursoft/chessserver!66
2024-07-04 11:34:47 +00:00
dvorakchen ef2d7b6c10 Merge branch 'master' of https://gitlab.aiursoft.cn/dvorak/chessserver
Merge master
2024-07-04 19:30:56 +08:00
dvorakchen 9d6da46f4e feat: red highlight in check 2024-07-04 19:30:26 +08:00
dvorak chen 6d6076c3bc Merge branch 'master' into 'master'
feat: message tip

See merge request aiursoft/chessserver!65
2024-07-04 07:31:56 +00:00
dvorakchen 3c071f68cd feat: message tip 2024-07-04 15:15:11 +08:00
dvorak chen 99f1946fa1 Merge branch 'master' into 'master'
feat: add track

See merge request aiursoft/chessserver!61
2024-07-04 03:45:19 +00:00
Anduin Xue 71da95dfe1 Simplify AI difficulty calculation in ChessEngine
Removed the randomness from the AI difficulty calculation in ChessEngine. Now the depth purely relies on the given difficulty, providing a more consistent user experience.
2024-07-03 15:53:50 +00:00
Anduin Xue 01d974bfb5 Set maximum difficulty level in PveController
A change has been added to cap the difficulty level at 15 in the PveController. Allowing it to go higher could potentially cause issues. Now, when a difficulty greater than 15 is entered, it will automatically reset to 15.
2024-07-03 15:40:06 +00:00
Anduin Xue b7a1caa5a5 Update difficulty levels in ChessEngine
Added a new difficulty level and adjusted the ranking of the "Unbeatable" level. Changes also include a minor adjustment in the calculation of the depth variable for the GetBestMove function. Comments with the old difficulty levels have been removed from both the ChessEngine service and the _Layout view.
2024-07-03 15:39:15 +00:00
Anduin Xue 9bc235a984 Add difficulty levels to "Against AI" game mode
Multiple difficulty levels have been implemented for the "Against AI" mode. This involved changes in the user interface to allow players to select the difficulty and corresponding adjustments in the game logic. Also, Artificial Intelligence behavior has been adapted according to these difficulty levels.
2024-07-03 15:22:11 +00:00
Anduin Xue d35e0989f9 chore: Update LynxChess.Lynx package reference to LynxChess.Lynx.Internal 2024-07-03 14:48:00 +00:00
dvorakchen 7b6000e2d7 feat: track highlight 2024-07-03 21:40:09 +08:00
dvorak chen 4b407ca9c4 Merge branch chessserver:master into master 2024-07-03 02:38:09 +00:00
Anduin Xue e21ea7ee88 Improve move validation in ChessEngine
The chess move validation process has been updated in ChessEngine. Now the code uses the ChessBoard class to load from FEN and validate each move, before picking the best one. This change provides stronger error-checking on generated moves.
2024-07-02 13:33:26 +00:00
Anduin Xue ae4502a263 Add statusControl and roleControl to ChessBuilder
In ChessServer, the ChessBuilder function and instantiation now take parameters for the statusControl and roleControl elements. This change improves flexibility by allowing these controls to be passed in from the invoking context, rather than being statically defined within the ChessBuilder function.
2024-07-02 12:41:27 +00:00
dvorak chen a891e8a4d6 Merge branch chessserver:master into master 2024-07-02 12:35:55 +00:00
Anduin Xue 0fffb18029 Merge branch 'refactor-dv' into 'master'
Refactor chessBoard.js

See merge request aiursoft/chessserver!64
2024-07-02 12:24:11 +00:00
Anduin Xue d37df1970a Improve game visibility and adjust search depth
Added several logging options to increase visibility of the game's internal operations. Also limited the chess engine's iterative deepening depth-first search (IDDFS) to a depth of 10 to improve performance efficiency. Additionally, changed the representation of '0' to 'O' due to notation issues in the GamesController.
2024-07-02 12:23:26 +00:00
dvorak chen d70961f31d Merge branch chessserver:master into refactor-dv 2024-07-02 12:14:48 +00:00
dvorak chen 54ed2c2b27 Merge branch chessserver:master into master 2024-07-02 12:14:39 +00:00
Anduin Xue 1c36398f38 Update script reference in _Layout.cshtml
The script reference to layout.js in the _Layout.cshtml file was updated by adding an "asp-append-version" attribute. This will ensure a fresh copy of the script is loaded by appending a version query parameter to the URL, useful for cache busting.
2024-07-02 11:58:15 +00:00
Anduin Xue 8143eea15f Refactor PveController in ChessServer module
Unused 'System.Drawing' import is removed and unnecessary variable creations are eliminated in PveController. Especially, the acceptedChallenge variable and the board variable within fen changes subscription logic are omitted to make the code cleaner and more efficient.
2024-07-02 11:56:33 +00:00
Anduin Xue 7be9d758d1 Reduce search depth and fix turn-checking method
The search depth for the iterative deepening depth-first search (IDDFS) in the ChessEngine has been reduced for performance reasons. In addition, the method for checking whose turn it is in the PveController has been altered. This now checks the color of the pieces, rather than looking up the player's ID, yielding more accurate results.
2024-07-02 11:55:26 +00:00
Anduin Xue 8047201b4b Add computer player interaction in PveController
A new section for adding a computer player has been implemented in PveController. This enhancement includes creating a challenge, letting the computer accept the challenge, and allowing the computer to respond to the player's move. Additionally, the delay for the UI update has been increased and a redirect to the game page is included.
2024-07-02 11:43:44 +00:00
Anduin Xue 264f64c21b Integrate AI chess engine and player vs AI functionality
Added new ChessEngine service as a singleton and integrated "LynxChess.Lynx" package. A new "Against AI" button is included in the layout. Player's ID is now appened to the "Against AI" button link. Created a new controllers, PveController, to handle interactions in Player versus AI mode.
2024-07-02 11:39:05 +00:00
dvorakchen 8961cd2dce chore: remove unnecessary 2024-07-02 16:45:21 +08:00
dvorak chen dc63112dde Merge branch chessserver:master into refactor-dv 2024-07-02 08:42:19 +00:00
dvorakchen 206ce92ed5 refactor: chessboard.js 2024-07-02 16:37:30 +08:00
dvorak chen 6bb879c52a Merge branch chessserver:master into master 2024-07-02 03:20:42 +00:00
Anduin Xue db02d640e8 Use sudo to run docker because rootless docker may be provided by docker desktop and runs in VM, which has problem of pass through devices. 2024-07-01 17:08:02 +00:00
dvorak chen e95e0585a5 Merge branch chessserver:master into master 2024-07-01 12:44:49 +00:00