Hello developer community! First a quick introduction: I am a programmer and blogger. For the last few years I've been writing a series on the history of the internet, covering the year 1969 onwards, which you can find here: https://simpleprogrammer.com/author/kevinoshaughnessy/ I would like to follow this with a mini series on chess engines and online chess, starting with the earliest AI experiments through to the world champion crushing bots that we have today. I am fairly new to chess and chess engines but find the topic interesting. I'm interested to hear which topics that you would be interested in reading about or feel are important to include. I appreciate your feedback.
vijaypuliparazh Aug 18, 2021
Hi,I am a software engineering student and I am developing a program that analyses a chess.com profile (archived games) and determines if that user is/was cheating. I am wondering if there is a list of profiles banned for cheating so that I could access their games and test my program?Thanks
Kadenstarr Aug 13, 2021
Hello guys, I'm creating something like a cheaper DGT board (It is much expensive in Brazil) and I would like to know if it is possible to make moves from an API like we can do on lichess. There is a API to control game?
rodolpho_netto Aug 11, 2021
This has now been an issue for over 48 hours. Team matches not accessible via API. Could it be prioritised please. Example https://api.chess.com/pub/club/norfolk-knights/matches {"code":0,"message":"An internal error has occurred. Please contact Chess.com Developer's Forum for further help https://www.chess.com/club/chess-com-developer-community ."}
stephen_33 Aug 9, 2021
I'm trying to collate the results for the first stage of this year's TMCL tournament but I keep hitting a small snag with the following club that's taking part... https://www.chess.com/club/the-empire-of-assassins The club name appears to be as it's displayed: "The Empire Of Assassins" No extra spaces or odd characters but my program crashed (as I prefer it to) because the spelling of the name in the club's matches is different from the one I have in my input file. For example... https://api.chess.com/pub/match/1209620 "name":"The Empire Of Assassins" Note the double-space between Of and Assassins! Simple I thought, I'll ask the club SA to edit the club name to remove the superfluous space. They did that but the name given in this and another match remained the same. Interestingly here... https://api.chess.com/pub/club/the-empire-of-assassins "name":"The Empire Of Assassins" The name is given without the extra space but why is the club name different between different endpoints? Without an immutable reference for a club by which an endpoint might be accessed, the task of processing club-related data is difficult enough (some admins just love changing their club's name) but if the name itself isn't held consistently between endpoints, the job becomes a lot harder.
Is there a way to do the following via API: create a live event and add players add specific matches with players/times defined retrieve results of those games (optionally tell if a player was a "no-show" for the specified time) Thanks - appreciate the input (Real)gojira
I have a short program written in Python (I'm running v3.7) that inputs values from a file, adds or subtracts from a running balance and checks the float-value of that running balance, maintained by the program, with that held in the input file. Simple enough you'd think and up until today it's worked nicely but after updating my data file and running the figures through the program, I came across this unexpected result... 41389.46 + 1.70 yielded the result 41391.159999999996 this isn't a problem and reflects the fact that decimal values can't always be represented precisely by binary-based systems. When I need to display such a value I specify two decimal places and that's usually fine. But the next line caused the problem... 41391.159999999996 - 41391.16 yields -7.275957614183426e-12 The expected balance is 0.00 but the following formatting of -7.275957614183426e-12 gives this bizarre (to me) result... f'{-7.275957614183426e-12:.2f}' gives -0.00 (minus zero!) of course when my program compares -0.00 with 0.00, it detects a mismatch. It looks like a possible oversight (if not a bug?) within Python but is there any easy way I can correct this, preferably without the use of additional modules? I've been looking at the Python Decimal module but I'm not sure yet if the solution is in there.
stephen_33 Jul 31, 2021
Hello devs, do you know if chess.com has own OAuth2 system? I would like to add button and action like "log in with chess.com" to my project. Thanks for answers.
henry_in_pt Jul 29, 2021
Hi! I was wondering if there is any endpoints/any plans to build out an endpoint to search for games played between two users? Searching through the archives would be pretty intensive client-side. Has anyone else requested this?
Tricky_Dicky Jul 24, 2021
If anyone is interested I made a Python package that pulls your chess.com or lichess.org games from their APIs and puts them into an SQLite database for you to do analysis, or whatever you'd like. If people want it I'll add support for import PGN files from disk instead of an API. You can find it on PyPI: https://pypi.org/project/pgn_to_sqlite/
EverydayRonin Jul 12, 2021
what's the most efficient way to identify an opening from a PGN without reinventing the wheel? is there an existing python implementation/API?
This member, @gwi02, was fair play banned but FPV has not been registered in the following team match. https://api.chess.com/pub/match/1205416 (It is correctly shown in this team match https://api.chess.com/pub/match/1247201)
Hi, I am analyzing a chess game PGN File. I used the stockfish 13 API to perform game moves Analysis but, the engine is computing some rubbish evaluation scores. the same game gets an evaluation close to 0 for e2e4. but the output of my python code using python chess and stockfish chess engine is getting evaluations of -3, +111. Why is this? How to do it right? PGN File: ``` [Event "Live Chess"][Site "Chess.com"][Date "2020.06.12"][Round "-"][White "LooseLoaf"][Black "joseines80"][Result "0-1"][CurrentPosition "6k1/p7/2p2p1p/4p3/8/8/r7/2K4r w - -"][Timezone "UTC"][ECO "C41"][ECOUrl "https://www.chess.com/openings/Philidor-Defense"][UTCDate "2020.06.12"][UTCTime "23:05:47"][WhiteElo "1023"][BlackElo "1204"][TimeControl "600"][Termination "joseines80 won by checkmate"][StartTime "23:05:47"][EndDate "2020.06.12"][EndTime "23:22:19"][Link "https://www.chess.com/game/live/4992823751"] 1. e4 e5 2. Nf3 d6 3. c3 Bg4 4. Bb5+ c6 5. Bc4 Bxf3 6. gxf3 b5 7. Bf1 h6 8. d4 Qf6 9. dxe5 dxe5 10. Nd2 Bd6 11. Bh3 Ne7 12. Nb3 Qh4 13. Bf1 Bc7 14. Be3 O-O 15. Nc5 Bb6 16. Nb7 Bxe3 17. Qd6 Qxf2+ 18. Kd1 Qxf3+ 19. Be2 Qxh1+ 20. Kc2 Qxa1 21. Qxe7 Qc1+ 22. Kb3 Na6 23. Bh5 Qf1 24. Nd6 Nc5+ 25. Kb4 Nd3+ 26. Ka3 Bc5+ 27. Kb3 Nc1+ 28. Kc2 Bxd6 29. Qxd6 Qf6 30. Qxf6 gxf6 31. Bxf7+ Rxf7 32. Kxc1 Rd7 33. c4 bxc4 34. Kc2 Rd4 35. b3 cxb3+ 36. Kxb3 Rxe4 37. a4 Rb8+ 38. Ka3 Rbb4 39. Ka2 Rxa4+ 40. Kb2 Reb4+ 41. Kc3 Rh4 42. h3 Rxh3+ 43. Kd2 Ra2+ 44. Kc1 Rh1# 0-1 ``` Code: ``` board = chess.Board()for i in moves:board.push_san(i)print(board.fen())stockfish.set_fen_position(board.fen())print(stockfish.get_fen_position())print(stockfish.get_evaluation())info = engine.analyse(board, chess.engine.Limit(.001))print("Score:", info["score"])print() ``` Evaluation output: ``` rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq - 0 1rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq - 0 1{'type': 'cp', 'value': -3}Score: PovScore(Cp(-32), BLACK) rnbqkbnr/pppp1ppp/8/4p3/4P3/8/PPPP1PPP/RNBQKBNR w KQkq - 0 2rnbqkbnr/pppp1ppp/8/4p3/4P3/8/PPPP1PPP/RNBQKBNR w KQkq - 0 2{'type': 'cp', 'value': 111}Score: PovScore(Cp(+46), WHITE) rnbqkbnr/pppp1ppp/8/4p3/4P3/5N2/PPPP1PPP/RNBQKB1R b KQkq - 1 2rnbqkbnr/pppp1ppp/8/4p3/4P3/5N2/PPPP1PPP/RNBQKB1R b KQkq - 1 2{'type': 'cp', 'value': 9}Score: PovScore(Cp(-29), BLACK) rnbqkbnr/ppp2ppp/3p4/4p3/4P3/5N2/PPPP1PPP/RNBQKB1R w KQkq - 0 3rnbqkbnr/ppp2ppp/3p4/4p3/4P3/5N2/PPPP1PPP/RNBQKB1R w KQkq - 0 3{'type': 'cp', 'value': 59}Score: PovScore(Cp(+79), WHITE) rnbqkbnr/ppp2ppp/3p4/4p3/4P3/2P2N2/PP1P1PPP/RNBQKB1R b KQkq - 0 3rnbqkbnr/ppp2ppp/3p4/4p3/4P3/2P2N2/PP1P1PPP/RNBQKB1R b KQkq - 0 3{'type': 'cp', 'value': 37}Score: PovScore(Cp(+6), BLACK) rn1qkbnr/ppp2ppp/3p4/4p3/4P1b1/2P2N2/PP1P1PPP/RNBQKB1R w KQkq - 1 4rn1qkbnr/ppp2ppp/3p4/4p3/4P1b1/2P2N2/PP1P1PPP/RNBQKB1R w KQkq - 1 4{'type': 'cp', 'value': 112}Score: PovScore(Cp(+69), WHITE) rn1qkbnr/ppp2ppp/3p4/1B2p3/4P1b1/2P2N2/PP1P1PPP/RNBQK2R b KQkq - 2 4rn1qkbnr/ppp2ppp/3p4/1B2p3/4P1b1/2P2N2/PP1P1PPP/RNBQK2R b KQkq - 2 4{'type': 'cp', 'value': -26}Score: PovScore(Cp(+77), BLACK) rn1qkbnr/pp3ppp/2pp4/1B2p3/4P1b1/2P2N2/PP1P1PPP/RNBQK2R w KQkq - 0 5rn1qkbnr/pp3ppp/2pp4/1B2p3/4P1b1/2P2N2/PP1P1PPP/RNBQK2R w KQkq - 0 5{'type': 'cp', 'value': -12}Score: PovScore(Cp(+15), WHITE) rn1qkbnr/pp3ppp/2pp4/4p3/2B1P1b1/2P2N2/PP1P1PPP/RNBQK2R b KQkq - 1 5rn1qkbnr/pp3ppp/2pp4/4p3/2B1P1b1/2P2N2/PP1P1PPP/RNBQK2R b KQkq - 1 5{'type': 'cp', 'value': -101}Score: PovScore(Cp(+62), BLACK) . . , ```
ImperfectAge Jun 28, 2021
I'm looking for open-source polyglot opening books to help exclude opening moves from a tool I'm developing which analyzes games from PGN.
ImperfectAge Jun 28, 2021
Hi, The chess.com player gaes data is not being read properly into the spark dataframe. How do i fix this? My code is below: Code to save the game data in a CSV file format: ``` data-url= https://api.chess.com/pub/player/erik/gamesgames= requests.get(data-url).json()df= pd.json_normalize(games['games'])df['poi']= 'erik'df.to_csv('data.csv', index=False) df = spark.read.format("csv").load(r'/media/disk2/isb_ras/sachin/chess/matches/games_larrygm.csv',header=True) ``` As you can see in the below screenshot, everything is in the first column and all other columns have none. Any suggestions are appreciated.
sachinsksm99 Jun 20, 2021
As many of you know, starting from the 8th of March API returns not the full list of team matches, but the trimmed list of them. From the news ( https://www.chess.com/news/view/non-breaking-change-club-matches-endpoint ) we expect to have a following structure of the endpoint: {"finished": [ 1000* most recent matches ],"in_progress": [ All in progress matches ],"registered": [ All registered matches],"comment": "Results are temporarily reduced to the most recent 1000 matches for performance reasons"} * In fact it was reduced later to 500, as it is said in "comment" section now. Obtained JSON has the expected structure: and "in_progress" and "registered" sections are absolutely correct. But "finished" section contains 500 daily matches starting from the most old one (look after the match ID): So at number #499 (500th daily match) we have a match that was finished 9 years ago. And then, starting from number 500, finished live matches are placed. We currently have only 476 live matches played, so I don't know: will this bug be reproduced for live section as well or not, when we pass the limit of 500 matches. Concluding, there is no currently a way to obtain a list of recently finished matches for your team, if more than 500 matches were played. P.S. Using the opportunity, I repeat my unanswered question published under the related news ( https://www.chess.com/news/view/non-breaking-change-club-matches-endpoint#comment-58266362 ): Does "temporarily" means that you plan to return full functionality for the endpoint later on? If so, could you give an approximate timescale? A month later? A year? Wouldn't it be better to separate this endpoint by two ( /pub/club/{ID}/lastmatches and /pub/club/{ID}/allmatches ), asking developers to use only first one, if possible?
stephen_33 Jun 16, 2021
I was wondering if the publicly available data from the chess.com API (games, players etc.) can be used by me in an app/website that I am making? If yes, are there restrictions on the app? For instance, does it have to be non-commercial? Can I ask for donations in the app/website? I have read the API agreement posted here https://www.chess.com/clubs/forum/view/readme-1#comment-33653396. My app is not a competing app, and it discloses that games are from chess.com, and also has a link to the corresponding games. And currently I store only a small amount of data gathered from the API at any time. I was directed to ask the question in this forum by chess.com's Member Support. The person asked me to contact one of the 'SAs' here.
elmsakni Jun 6, 2021
So, I just started coding about 6 months ago. I know some HTML, CSS, and Javascript, but I felt like they were just not as fast and easy as python. I decided to start learning the pygame library. Today, I tried to make a chess board with the least amount of lines possible. Here is my code: import pygamepygame.init()window = pygame.display.set_mode([640, 640])window.fill((0, 0, 0))x_axis = 0y_axis = 0rect = pygame.Rect(x_axis, y_axis, 80, 80)flag = Truefor y in range(0, 8): for x in range(0, 8): pygame.draw.rect(window, (255, 255, 255), rect) pygame.draw.rect(window, (101, 67, 33), rect, 5) rect = pygame.Rect(x_axis, y_axis, 80, 80) x_axis += 160 y_axis += 80 if flag: x_axis = 80 flag = False else: x_axis = 0 flag = Truepygame.display.update()pygame.time.wait(40000) As you can see, it was 23 lines without the empty lines. I feel like this is a bit lengthy, especially for just a black and white board with brown outlines. Could someone please show me a better way to this (if there is)?
tokenplayer May 28, 2021
I have come across two instances of team matches requests that should return "not found" error. https://api.chess.com/pub/club/team-méxico/matches https://api.chess.com/pub/club/team-trentino-südtirol/matches These calls do not return any responce at all. Just a blank page. Probably relates to extended character set chars.
stephen_33 May 21, 2021
as you can see if a friend is online it is supposed to display green and if a friend is in live its supposed to display orange but why is it displaying red a bug perhaps
Martin_Stahl May 15, 2021