2.2.1 • Published 7 months ago
@nodots-llc/backgammon-ai v2.2.1
Nodots Backgammon AI
A TypeScript library that provides AI capabilities for backgammon games using GNU Backgammon (gnubg) as the backend engine. This package is part of the Nodots Backgammon ecosystem.
Features
- Integration with GNU Backgammon (gnubg) engine
- TypeScript support with full type definitions
- Comprehensive test coverage
- Built on top of @nodots-llc/backgammon-core
Installation
npm install @nodots-llc/backgammon-aiPrerequisites
This package requires GNU Backgammon (gnubg) to be installed on your system. Please refer to the GNU Backgammon documentation for installation instructions.
Usage
import { BackgammonAI } from '@nodots-llc/backgammon-ai'
// Initialize the AI
const ai = new BackgammonAI()
// Get AI move suggestions
const move = await ai.getBestMove(gameState)Development
Setup
- Clone the repository:
git clone https://github.com/nodots/nodots-backgammon-ai.git
cd nodots-backgammon-ai- Install dependencies:
npm installAvailable Scripts
npm run build- Build the projectnpm run test- Run testsnpm run test:watch- Run tests in watch modenpm run test:coverage- Run tests with coverage reportnpm run lint- Run ESLintnpm run lint:fix- Fix ESLint issuesnpm run clean- Clean build artifacts
License
MIT © Nodots LLC
Author
Ken Riley kenr@nodots.com