Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 542537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:27:26+00:00 2026-05-13T10:27:26+00:00

Is there any Chess game API , purely written in JavaScript ? No Flash!

  • 0

Is there any Chess game API , purely written in JavaScript ? No Flash!
Anybody know the algorithm(in general) used in Chess games ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T10:27:26+00:00Added an answer on May 13, 2026 at 10:27 am

    How does a chess algorithm work?:

    What a chess computer tries to do is
    generate the board-position tree five
    or 10 or 20 moves into the future.
    Assuming that there are about 20
    possible moves for any board position,
    a five-level tree contains 3,200,000
    board positions. A 10-level tree
    contains about 10,000,000,000,000 (10
    trillion) positions. The depth of the
    tree that a computer can calculate is
    controlled by the speed of the
    computer playing the game. The fastest
    chess computers can generate and
    evaluate millions of board positions
    per second.

    Once it generates the tree, then the
    computer needs to “evaluate the board
    positions.” That is, the computer has
    to look at the pieces on the board and
    decide whether that arrangement of
    pieces is “good” or “bad.” The way it
    does this is by using an evaluation
    function. The simplest possible
    function might just count the number
    of pieces each side has. If the
    computer is playing white and a
    certain board position has 11 white
    pieces and nine black pieces, the
    simplest evaluation function might be:

      11 - 9 = 2 
    

    Obviously, for chess that formula is
    way too simple, because some pieces
    are more valuable than others. So the
    formula might apply a weight to each
    type of piece. As the programmer
    thinks about it, he or she makes the
    evaluation function more and more
    complicated by adding things like
    board position, control of the center,
    vulnerability of the king to check,
    vulnerability of the opponent’s queen,
    and tons of other parameters. No
    matter how complicated the function
    gets, however, it is condensed down to
    a single number that represents the
    “goodness” of that board position.

    Source.

    For building your own javascript ‘engine’ that’s able to play chess at a basic level check Step by Step Javascript Chess with CPU oppo

    If you scroll down it contains the source code of this, must say very limited, chess engine purely based on javascript. It also has a working version of the game to try out and all the necessary resources for building your own.

    Some useful resources:

    • First implementation of a chess engine in Javascript
    • The Anatomy of
      Chess Programs
      , by Tony Marsland, is a nice intro on how current
      chess programs work.
    • Chess Space
    • Paul
      Verhelst
      – Question and Answers
    • Bibliography
      on Minimax Algorithms
      (newer version).
    • Crafty is a strong program
      whose source code is freely available and, for a chess program, quite
      readable.
    • Unfinished Work and Challenges to Chess Programmers
    • Is there a perfect algorithm for Chess? Discussion here on so
    • How Computers Play Chess The best book I’ve found describing the theory behind chess AI algorithms
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 431k
  • Answers 431k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The simple way to it is: $params = array_merge( $_GET,… May 15, 2026 at 2:11 pm
  • Editorial Team
    Editorial Team added an answer The other way around is much simpler. Your page defaults… May 15, 2026 at 2:11 pm
  • Editorial Team
    Editorial Team added an answer Average on what, given you are already using FIRST and… May 15, 2026 at 2:11 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.