lichess-org / lichess-org/api

[Bug] Opening Explorer - Lichess Game - Response is misleading

Open
#657 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
597
Forks
176
Avg merge
1d 4h
Merged PRs (30d)
6

Description

Summary

In the response of Opening Explorer - Lichess Game, the Win/Draw/Lose (or White/Draw/Black win) result is not representative, and misleading:

Time of discovery

2026-07-21T15:56:56Z

Reproduction

Open https://lichess.org/analysis
Import this PGN:

1. d4 f5 2. c4 Nf6 3. Nc3 e6 4. Nf3 Bb4 5. Qc2 b6 6. a3 Bxc3+ 7. Qxc3 a5 8. b4 axb4 9. axb4 Rxa1 10. Qxa1

Set the Explorer filter to Lichess Database, Bullet + Blitz + Rapid, 2000+2200+2500
Image

Note that the response says 1...Bb7 has 2 games, with 50/0/50 win rate. This suggests ...Bb7 leads to a practically equal, playable position for Black. (I know a sample size of 2 is not suggestive of anything, but it's easy to reproduce this issue).

Image

Reference URL

https://explorer.lichess.org/lichess?variant=standard&fen=rnbqkbnr%2Fpppppppp%2F8%2F8%2F8%2F8%2FPPPPPPPP%2FRNBQKBNR+w+KQkq+-+0+1&play=d2d4%2Cf7f5%2Cc2c4%2Cg8f6%2Cb1c3%2Ce7e6%2Cg1f3%2Cf8b4%2Cd1c2%2Cb7b6%2Ca2a3%2Cb4c3%2Cc2c3%2Ca7a5%2Cb2b4%2Ca5b4%2Ca3b4%2Ca8a1%2Cc3a1&speeds=rapid%2Cblitz%2Cbullet&ratings=2500%2C2200%2C2000&source=analysis

Click 10...Bb7, view the resulting position. Note that now Explorer says there are 8 games, not 2, most likely via transpositions. Now the win rate is 75/13/13, clearly NOT easy to play as Black.

Image

Why is this an issue?

When analyzing opening, the White player (for example) needs to look at:

  • At this specific position, what moves do Black players play the most? Obviously more common most should be prepared.
  • Is the resulting position, how easy it is to play for White/Black for a Win/Draw, represented by the W/D/B number? This is important because even though a position may be evaluated by engine as equal, it may be very difficult for Black to find the optimal follow-up move, resulting in good win rate for White.

The currently returned response does NOT answer the 2nd question correctly, and is thus misleading.

Suggestion

The displayed number of ...Bb7 games should still be 2: important in analyzing how likely it is to encounter this move, but the win rate should be calculated on the resulting position from transpositions as well. Maybe it's a good idea to display both 2 (move likelihood from this position) and 8 (number of games reached).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Opening Explorer - Lichess Game response using the reproduction PGN and reference URL, then compare the 2-game move result with the 8-game transposition result after clicking 10...Bb7. Done means the response preserves the move's occurrence count while representing results from the resulting position, with the returned values clearly distinguishing those counts.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.