Offer more computer difficulty levels than three

Aberta
#184 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
55/100
Tipo de issue
Funcionalidade
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
javascript
Domínio
game-dev

Direção de pesquisa

Read js/ai.js lines 13–17, then inspect the settings selector and saved-setting migration in js/config.js and js/main.js. Run npm test and review tests/unit/ai-strength.test.js to understand how strength is measured. Done when old easy, medium, and hard settings retain their strengths and every new level tests measurably stronger than the one below.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

enhancement help wanted severity: low

Summary

The computer has only three levels, and the gap between them is large. Offer a finer scale, for example 1 to 6, built from the knobs the engine already has: depth, thinking time, blunder rate and tolerance.

Where

  • js/ai.js:13-17 (AI_LEVELS: easy is depth 1 with 30% blunders, medium is depth 2, hard is depth 3 with a 1 s timed search)
  • The settings level selector, and the migration of the saved setting

Impact

Improving players get a step between medium and hard, and beginners get something gentler than easy. Stronger levels depend on a faster move generator, which is tracked separately (move generation dominates search).

Suggested fix

Turn AI_LEVELS into a numbered scale. Map today's easy, medium and hard to three of its steps, so saved settings keep their meaning. Add the new steps around them.

Open question: should this wait for #160 (a record of results against the computer), which could suggest a level?

Acceptance criteria

  • Saved settings of easy, medium and hard still load as the same strength.
  • Each level plays measurably stronger than the one below it in the existing ai-strength tests.

Getting started

  • Relevant files: js/ai.js, js/config.js, js/main.js (settings), tests/unit/ai-strength.test.js
  • How to run tests: npm test

Filed by repo-audit/full-audit at 01c6a35. Severity: low. Effort: S. audit-key: enhancement|js/ai.js|AI_LEVELS

Linguagem predominante
JavaScript
Estrelas
4
Forks
2
Merge médio
22h 16min
PRs com merge (30d)
9

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de TMHSDigital/Static_Chess

Todas as issues de TMHSDigital/Static_Chess

Issues semelhantes

Mais issues de JavaScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.