nguyenpham / ocgdb

Open Chess Game Database Standard (OCGDB)
MIT License
31 stars 8 forks source link

Option to remove engine games #34

Closed Jonathan003 closed 2 years ago

Jonathan003 commented 2 years ago

You where saying on talkchess.com

I think bots may have the prefix BOT. Of course, you can't be sure for cheating accounts that use engines under human names.

I didn't check if al engine games have the prefix BOT. And would that be the only way to know if it are engine games? I would like to have some options to remove engine games with ocgdb or Banksia.

nguyenpham commented 2 years ago

I think that is the only way. Lichess has a condition of using software: it must play under a bot title (in PGN, they are WhiteTitle, BlackTitle). Thus all other players are supposedly human.

I have been thinking about your request. It is easy if you could program or compile yourself. Otherwise, even it is easy to implement but I have been worried since it may make the program be more complicated for users with not-frequently-use features.

[Event "Casual Classical game"]
[Site "https://lichess.org/eGDqHrzQ"]
[Date "2022.03.07"]
[White "el_q-cumber"]
[Black "maia5"]
[Result "0-1"]
[UTCDate "2022.03.07"]
[UTCTime "00:55:53"]
[WhiteElo "1500"]
[BlackElo "1591"]
[BlackTitle "BOT"]
[Variant "Standard"]
[TimeControl "10800+5"]
[ECO "C50"]
[Opening "Four Knights Game: Italian Variation"]
[Termination "Normal"]
[Annotator "lichess.org"]

1. e4 e5 2. Nc3 Bc5 3. Nf3 Nc6 4. Bc4 Nf6 { C50 Four Knights Game: Italian Variation } 5. O-O O-O 6. d3 d6 7. Be3 Bb6 8. Qd2 Bg4 9. Qe2 Nd4 10. Qd1 Nxf3+ 11. gxf3 Bh3 12. Re1 Nh5 13. Kh1 Nf4 14. Bxf4 exf4 15. Rg1 Bxf2 16. Rxg7+ Kxg7 17. Qe2 Be3 18. Nd5 Qg5 19. Nxe3 fxe3 20. Rg1 Qxg1+ 21. Kxg1 Rg8 22. Kh1 Kh8 23. Qxe3 Bg2+ 24. Kg1 Bxf3+ 25. Kf2 Bh5 26. Qd4+ Rg7 27. Bd5 c6 28. Bb3 Rg8 29. e5 dxe5 30. Qxe5 Bg6 31. h4 h5 32. d4 Kh7 33. c3 Rf8 34. Bd1 f6 35. Qc5 Rff7 36. Bxh5 Bxh5 37. Qxh5+ Kg8 38. c4 Rh7 39. Qg4+ Rfg7 40. Qe6+ Rf7 41. d5 cxd5 42. cxd5 Rxh4 43. Ke3 Rh3+ 44. Kd4 Rh4+ 45. Kc5 b6+ 46. Kc6 Rc4+ 47. Kb5 Rc5+ 48. Ka6 Ra5# { Black wins by checkmate. } 0-1
nguyenpham commented 2 years ago

Another solution is that after having a new Lichess database, users could remove all bot games (or keep only bot games), using SQL statements. That is easy and so flexible. However, it should apply to small databases (under 20 million games). For extreme larger ones, it may waste time.

nguyenpham commented 2 years ago

Implemented https://github.com/nguyenpham/ocgdb/releases/tag/VersionBeta8

Jonathan003 commented 2 years ago

Thanks for the update! Can I find a smal example database somewhere to test the new function to remove engine games? And do you still only recommend to do a search to remove engine games with small databases (under 20 million games)?