Search found 59 matches

by odomobo
Tue May 07, 2019 4:35 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: A bug is squashing me. HELP!
Replies: 20
Views: 2932

Re: A bug is squashing me. HELP!

That sounds like a bug. A triangular PV table could help you debug it. If it helps, I have an implementation here that you could use/modify: https://bitbucket.org/odomobo/gearheart ... vTable.hpp
by odomobo
Tue May 07, 2019 4:01 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: A bug is squashing me. HELP!
Replies: 20
Views: 2932

Re: A bug is squashing me. HELP!

Also, one other thing to note: if you have qsearch (so the engine understands that captures have consequences), then a simple material-only evaluation won't encourage the engine to make any progress, in general. It'll take advantage of guaranteed tactics, but otherwise will essentially do random mov...
by odomobo
Tue May 07, 2019 3:55 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: A bug is squashing me. HELP!
Replies: 20
Views: 2932

Re: A bug is squashing me. HELP!

Oh my bad, you said it gives 100 or -100 from the initial position. It should give 0 for depths 1 and 2 (maybe even 3), but 100 or -100 for the rest (since it's easy to capture, e.g. a pawn with a queen on a given move, if you don't have to worry about the consequences). Something else that you migh...
by odomobo
Tue May 07, 2019 3:49 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: A bug is squashing me. HELP!
Replies: 20
Views: 2932

Re: A bug is squashing me. HELP!

Your code looks fine at initial glance. One issue I see is you claim that your code isn't working, but you aren't giving examples of what you're seeing vs what you expect to see. With a lack of qsearch, the horizon effect should be really bad. The way it's written, I would expect to see scores overs...
by odomobo
Wed May 01, 2019 1:03 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Pointers in C++, please help
Replies: 17
Views: 2560

Re: Pointers in C++, please help

lucasart is right. Instead of an array of a pointer of 2d arrays, you're better off having a single 3d array. There are techniques you can use such that this will strictly be more efficient, never less efficient. u08 mvsB[][64][8]; // references to sub-arrays u08 (&mvsNW)[64][8] = mvsB[0]; u08 (&mvs...
by odomobo
Tue Apr 30, 2019 9:11 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Pointers in C++, please help
Replies: 17
Views: 2560

Re: Pointers in C++, please help

I played around with it, and figured out how to do it with a natural array. However, I personally find the notation more confusing. u08 mvsNW[64][8]; //... u08 (*mvsB[])[64][8] = { &mvsNW, &mvsNE, &mvsSW, &mvsSE }; // ... auto & mvs = *mvsB[i]; m->ts = mvs[m->fs][j]; I also found another way to do t...
by odomobo
Tue Apr 30, 2019 7:01 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Pointers in C++, please help
Replies: 17
Views: 2560

Re: Pointers in C++, please help

Actually, something I just realized is that c++ doesn't like the notation for pointers to normal arrays, so std::array will help us out here. Maybe there's a way to do it, but if so it's beyond me. // These are vectors for the bishop. Ex: mvsNW[A1][0] is the number of squares. [A1][1-7] are the to s...
by odomobo
Tue Apr 30, 2019 6:04 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Pointers in C++, please help
Replies: 17
Views: 2560

Re: Pointers in C++, please help

Can you post the declaration for mvsNW? Then I can walk you through it. it shouldn't require std::array to get this to work the way you want. Decaying to a pointer doesn't actually affect you right now, but I can show you an example: void foo() { int arr[10]; // ... bar(arr); // this works; int arra...
by odomobo
Tue Apr 30, 2019 4:04 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Pointers in C++, please help
Replies: 17
Views: 2560

Re: Pointers in C++, please help

BTW, std::array should have the same performance as a normal array. The purpose of having std::array in the language (as I understand it) is providing a strong type to represent an array (i.e. it won't decay to a pointer) and provides additional features (i.e. runtime bounds checking with .at() ). O...
by odomobo
Wed Mar 27, 2019 8:34 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Some x64 assembler for the curious
Replies: 21
Views: 4931

Re: Some x64 assembler for the curious

The nature of your learning disability eludes me a little bit. Your code seems pretty sophisticated, which is not what I would have expected with a learning disability. It's a personal issue, so I understand if you don't want to talk about it, but I am curious to understand it further.