Offer more computer difficulty levels than three

Đang mở
#184 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
55/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript
Lĩnh vực
game-dev

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
JavaScript
Star
4
Fork
2
Merge trung bình
22 giờ 16 phút
Pull request đã merge (30 ngày)
9

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của TMHSDigital/Static_Chess

Tất cả issue của TMHSDigital/Static_Chess

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.