-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add perft tests #13
Add perft tests #13
Conversation
Many thanks for this @nav-28 ! I'll try to run them. I have a question first: what are the use of the huge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we run this (partially) on CI and delete perft tests from position_test.dart
. In scalachess, we use 10 milions as node limits for most of the tests (except random.perft because it has too many cases).
For full perft tests we need to figure something else.
I'd leave the tests in |
Running the tests on CI sounds good, but just have to figure out how to run the tests due to the issue I mentioned above. Maybe delete/rename the |
just curious, why do we have to exclude this from |
If it's not excluded, it will run with all the other tests taking up much time. So had to add the tag to exclude it from running. But currently, there is no way to run excluded tests due to a bug in |
A thing I noticed was that the test case positions are epd not fen and I am using parseFen to set up the board. I looked at the spec of epd and didn't find much difference from fen. I hope that is not gonna cause any problems |
If we limit the |
Okay, that makes sense. I can look into that |
Ran for nodes less than 10 million. There are the errors I got.
|
So there's one for standard chess that fails at depth 1? I'll look into it. |
Yeah, just one that fails for standard chess. Just pointing out that I had |
@nav-28 instead of having a
that way we can separate tests easily, even on CI. |
Thats great. I will remove the YAML file. How do you want to separate the tests? Do you want all the perft tests to run on CI or just a subset of them? I tried separating them by nodes of less than 10 Mil and it took around 13 mins to run on my MacBook. |
Yes I think running a subset with a node number threshold is fine. How do you actually make that threshold? Ideally we should have 2 perft test suites, one under 10M that we run on CI and the full one that we can try to launch at least once, on demand, to verify. (I have no idea how long it would run though...). Node threshold logic could be added to the perft tests I guess? |
I added 2 files |
Great! Now we need to fix the lib to make tests pass ;) |
So this is all good. I created 3 new issues related to perft tests that now fail. So we can comment them out in this PR to make the build pass and we can open new PRs per variant to fix the issues. Also I think the new perft suite covers everything that was in |
Revolves #11
These tests won't run when
dart test
is run. Current, to run the tests, we have to remove the exclude tag line fromdart_test.yaml
. This is due to an unresolved issue dart-lang/test#1764After removing the tag, run the test with
dart test -t perft test/perft_test.dart
I haven't run all the tests, but there were some errors in Atomic and Crazyhouse.
If someone can run all the tests and paste the results, that would be great.
Tests are taken from scalachess