4.0.4 • Published 9 months ago
@algorithm.ts/gomoku v4.0.4
Install
npm
npm install --save @algorithm.ts/gomoku
yarn
yarn add @algorithm.ts/gomoku
Usage
Basic
import { Solution } from '@algorithm.ts/gomoku' const solution = new Solution({ MAX_ROW: 15, MAX_COL: 15, MAX_ADJACENT: 5, MAX_DISTANCE_OF_NEIGHBOR: 2, }) // Let's use 0 to represent WHITE piece and 1 to represent BLACK piece. // The chessboard can be regarded as a two-dimensional coordinate system, in which the y-axis is // to the right, the x-axis is downward, and the position of the first moveable piece on the // chessboard is (0,0) // put a WHITE piece on the position (7, 7). solution.forward(7, 7, 0) // put a BLACK piece on the position (6, 6). solution.forward(6, 6, 1) // ... (Omit some chess moves) // Try to choose a favorable position to place the WHITE piece in the free position of the chessboard. const [r0, c0] = solution.minimaxSearch(0) // Try to choose a favorable position to place the BLACK piece in the free position of the chessboard. const [r1, c1] = solution.minimaxSearch(1)
Related
4.0.4
9 months ago
4.0.3
10 months ago
4.0.1
1 year ago
4.0.2
1 year ago
4.0.0
1 year ago
3.1.1
2 years ago
3.1.0
2 years ago
3.0.0-alpha.8
2 years ago
3.0.0
2 years ago
3.0.0-alpha.7
2 years ago
3.0.0-alpha.6
2 years ago
3.0.0-alpha.3
2 years ago
3.0.0-alpha.2
3 years ago
3.0.0-alpha.5
2 years ago
3.0.0-alpha.4
2 years ago
3.0.0-alpha.1
3 years ago
3.0.0-alpha.0
3 years ago
2.0.14
3 years ago
2.0.13
3 years ago
2.0.12
3 years ago
2.0.11
3 years ago
2.0.10
3 years ago
2.0.9
3 years ago
2.0.8
3 years ago
2.0.8-alpha.0
3 years ago
2.0.7
3 years ago
2.0.7-alpha.1
3 years ago
2.0.7-alpha.0
3 years ago
2.0.6
3 years ago
2.0.5
3 years ago
2.0.4
3 years ago