- Click-Here to play now on web or mobile. You can also build the game yourself.
- Start clicking on the gameboard! }
- To modify game settings just click
Settings
- Skill is ranged between
1
and5
1
is random placement2-4
allows for deviations from the best position by a specific percentage, when applicable2
is75%
deviation3
is50%
deviation4
is25%
deviation
5
is best placement or0%
deviation
- Skill is ranged between
- Evaluations colors can be enabled (default) or disabled via the
Settings
screen - The visible the color the more valuable the position
Red
indicates is playerO
Green
indicates is playerX
- Various shades of color mixing between
Red
andGreen
reprents the shared value of that square between players
To provide the statistics above, it took ~18 minutes for 8 threads to individually generate 125,000 games each at ~8.3 ms/game. See the How To Generate AI/ML Datasets For Training
section to learn how to generate your own datesets for statistical analysis and AI/ML training!
- Games Drawn:
89.32%
- O Wins:
2.02%
- X Wins:
97.98%
- Compilation: 8 threads at ~8.3 ms/game with total time of ~18 minutes
- Games Drawn:
21.25%
- O Wins:
36.76%
- X Wins:
63.24%
- Compilation: 8 threads at ~1.7 ms/game with total time of ~7 minutes
- Open the
connect.html
file in your web browser from a website or a local web server - Click on the
DB
link at the top of the page - Change configure the settings for your needs
- Click the
Apply
button - Wait until threads complete and the data has been processed
- Click the
Download
button to download the newly generated DB, in your specified format, to your computer
- In the
Gameplay DB Generator
page, scroll down until you seeThreads
. Increase the number of threads to scale the multithreading capabilities of the generator. - MultiThreading is accomplished via JavaScript's WebWorkers
- Example:
X0303035O;512,257,513,514,258,0
- Part1:
X0303035O
*0303035O
represents the player played asX
orO
X**03035O
represents the gameboard size in theA
directionX03**035O
represents the gameboard size in theB
directionX0303**5O
represents the connect sizeX030303*O
represents theO
opponent's skill where0
is an AI/ML engine and1-5
is noob-to-expertX0303035*
represents the winner asX
,O
, orD
for draw
- Part2:
512,257,513,514,258,0
- This is an array of postionHashes (see
DB Parsing
for how to parse). The first value is alwaysX
.
- This is an array of postionHashes (see
- Description: This was a human vs computer game on a 3x3 gameboard with a connect size of 3 (tic-tac-toe). The computer was playing on expert difficulty, and won after a total of 6 moves.
- Part1:
- Common to all formats
X
always goes first- Positions are hashed into hexadecimal format
- EG: Placement
(A2,B3)
is encoded as0x0203
-
// Decode (positionHash: number) => { A: ((positionHash >> 8) & 0xff), B: (positionHash & 0xff)} // Encode (A: number, B: number) => ((A & 0xff) << 8) | (B & 0xff)
- EG: Placement
- CSV
- This format is file size optimized
- Game data example
OX:1,2,3;OX:2,3,4!OX:4,5,6,7,8,9; ...
OX:1,2,3;
the length of the array is 3. 3 is odd, so X won. Unless a!
appears instead of a:
.-
let winnerX: boolean = Boolean(array.length % 2)
-
OX:...;
O
represents the skill ofO
in a single digit. A value of0
indicates an AI/ML engine was used.X
represents the skill ofX
in a single digit. A value of0
indicates an AI/ML engine was used.
OX!...;
- The
!
instead of:
indicates that the game was a draw
- The
- JSON
- This format is compute optimized
- Games are stored in
games: HistoryReportInstance[]
HistoryReportInstance
is defined as-
{ h: number[], // history of placements o: number, // skill of player o x: number, // skill of player x w: boolean, // true is o winner, false is x winner, and null is drawn game }
-
Node.js
is required to build this app nodejs.org
Output files from the build processes are stored in the dist
directory
npm install
to download the dependencies to yournode_modules
directory
- This is for active coding/development
npm run dev
to watch for code changes and live-reload browser if changednpm run test-dev
to watch for code changes and re-run unit tests (Jest) if changed- Leverage the
printGameboard(displayOPieces?: boolean, note?: string)
function to visualize the evaluations in the command line-
*title-here* - *note-here* (x) A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ] B1 [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ] B2 [ ][ ][ ][ ][ 25][ ][ ][ ][ ][ ] B3 [ ][ ][ ][ ][ X ][ ][ 25][ ][ ][ ] B4 [ ][ ][ 25][ X ][ X ][ X ][ 25][ ][ ][ ] B5 [ ][ ][ ][ ][ X ][ ][ ][ ][ ][ ] B6 [ ][ ][ ][ X ][ 25][ ][ ][ ][ ][ ] B7 [ ][ ][ 25][ ][ ][ ][ ][ ][ ][ ] B8 [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ] B9 [ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
-
- Leverage the
- This builds the final production grade version of the app
npm run prod
to generate the optimized apps- Use
npm run serve
to start a web environment to play the game with all the features
- Use