skotz / chase-ai Goto Github PK
View Code? Open in Web Editor NEWEngine for the game of chase (not chess)
License: Apache License 2.0
Engine for the game of chase (not chess)
License: Apache License 2.0
Right now the interface is using WinForm buttons to draw the board, but that limits the ability to draw more complex stuff like arrows, zoom, anti-aliasing, etc.
Instead, this needs to be completely drawn from scratch onto a graphics object, potentially with a full game loop.
This should speed up the search since it uses alpha-beta pruning.
Right now there's no indication that you have to start a new game from the menu.
Sometimes it's hard to see when your pieces are in danger, especially wraparound bounce-bump-captures. Wraparound moves in general are hard to see, especially for new players. Somehow show when a piece is in danger via the UI.
This courtesy is similar to the convention of saying Atari when playing Go to let the opponent know they are in danger of capture: https://en.wikipedia.org/wiki/List_of_Go_terms#Atari
Right now the engine sometimes infinitely repeats moves. Add a way to force the engine to stop repeating itself.
Sometimes a misclick causes an accidental move. Maybe use a confirmation like chess.com uses. Or give an undo button. Multiple undo might be nice for trying out different choices after realizing a prior move was not so good after all...
According to the following Chase guide: http://superdupergames.org/rules/chase.pdf
Values of 4 are better in the opening, 5's are better in the end game, and 6's can only get to the chamber if they are on certain tiles regardless of how many moves you make.
Add some of this logic to the evaluation function.
Always search an even number of moves deep to record a move and its counter move. Right now I believe a point distribution after a capture is considered a move meaning a depth of 4 might not search two full moves. Always evaluate to a point where your opponent made the last move in the line.
the chess.com app has this feature. clicking analysis mode lets you try out your turn, then take your opponent's turn, then yours, etc. you can go back and forth and explore different moves for both players.
Kinda like a PGN file and viewer for chess.
Instead of storing the board as an array of 81 tiles (of which at most 20 indices will be non zero at any moment), maybe it makes sense to store the position as an array of piece objects that each have a value, player, and location. This would also make finding point distributions after a capture much easier.
I can't help but think of variants of chase. Now that there is an AI, maybe it could be used to quickly test ideas to see if they are worth testing further. Some ideas:
Similar to a chess engine's "analysis mode" where you can just sit there and see what the engine is thinking about the position.
Table[sourceIndex, direction] = targetIndex
superdupergames.org has this feature. it's useful for asynchronous play where you want to write notes to yourself so you remember you plan when you look at your next turn. You can store notes like: if he does x, do y, then probably z, etc.
When the computer knows for sure it will win, it considers all winning moves the same value. This leads to skipping a win-in-one since it has the same value as a win-in-3.
4de2c/9/2E2F3/7b1/6D1d/5e3/4b4/9/5EE2 r
Maybe letters could be used for the values. Capital letters for red and lowercase for blue. Numbers represent empty squares, and slashes represent new lines. Then there's a space and the player to move (either b or r).
So the starting position would be...
abcdedcba/9/9/9/9/9/9/9/ABCDEDCBA b
And the position in the image below would be...
a2de2ba/9/b8/Ec2c1E2/C1DB4d/5B3/9/9/AA3A2A b
Just calling the existing GetAllMoves method in the evaluation function killed the search speed (difference of 600k nps and 8000k nps). Find a way to include move counts in the calculation without slowing things down that much.
This'll be used for speeding up evaluations, creating opening books, and checking for position repetitions.
Where you show how many dice a player has in their hand (off the board), maybe also say how many captures before they lose the game. it will help new players know how close they are to losing and whether they can go for a move that involves an exchange or not.
For some reason, the red player makes meaningless moves even when it can capture a blue piece without being recaptured or land on the chamber and split.
See if there's special rules for things like landing on the chamber when you already have 10 pieces or if you repeat the same position 3 time it's a draw (if that's a rule).
Update GUI "In hand" to "# of pieces in hand".
Under that, add text that says "6+ pieces in hand = lose game"
Find a nice set of colors to use for pieces, tiles, labels, actions, etc...
Here's where you find the chase game history:
It doesn't have the full archive of games, but I can contact Aaron and ask for a database dump of all games if you want to explore this idea.
Change Chamber hex to a different color (black?) and change the text in the middle from CH to Chamber.
Somehow the engine created an 11th piece.
It would be nice to see a visual indicator that the AI took its turn. It would also be nice to see what they did visually rather than having to parse the coordinate moves. Perhaps with arrows pointing From the hex moved from to the hex moved to. Sharing points between dice: perhaps arrow of a different color or something.
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.