JohnWoe wrote: ↑Fri Apr 24, 2020 2:39 pm
That's too much code.
I simply Board = moves + i; And nothing else. There is no simpler way to do it.
copy+make or what's the correct terminology.
Don't understand. What is "+ i".
"ï" is next move? Then each time you need the current position you have to reconstruct it from the moves.
Too slow.
Last edited by Henk on Fri Apr 24, 2020 2:57 pm, edited 2 times in total.
JohnWoe wrote: ↑Fri Apr 24, 2020 2:39 pm
That's too much code.
I simply Board = moves + i; And nothing else. There is no simpler way to do it.
copy+make or what's the correct terminology.
Don't understand. What is "+ i".
"ï" is next move? Then each time you need the current position you have to reconstruct it from the moves.
Too slow.
It's a pointer to the global board. Board = moves + i
i = index -> in for loops.
Obviously my method only works on single threaded model. Slower method? Yes. But so simple. Bugs slow you down.
The thing is I don't need the current position ever. I just throw it away like trash.
JohnWoe wrote: ↑Fri Apr 24, 2020 2:39 pm
That's too much code.
I simply Board = moves + i; And nothing else. There is no simpler way to do it.
copy+make or what's the correct terminology.
Don't understand. What is "+ i".
"ï" is next move? Then each time you need the current position you have to reconstruct it from the moves.
Too slow.
It's a pointer to the global board. Board = moves + i
i = index -> in for loops.
Obviously my method only works on single threaded model. Slower method? Yes. But so simple. Bugs slow you down.
The thing is I don't need the current position ever. I just throw it away like trash.
Still don't understand. "i" is a pointer to the global board? And it iterates over global boards? Or where does it iterate over?
If it is a secret then never mind.
I also don't understand that you don't need the current position ever. O wait you create a new one each time.
JohnWoe wrote: ↑Fri Apr 24, 2020 2:39 pm
That's too much code.
I simply Board = moves + i; And nothing else. There is no simpler way to do it.
copy+make or what's the correct terminology.
Don't understand. What is "+ i".
"ï" is next move? Then each time you need the current position you have to reconstruct it from the moves.
Too slow.
It's a pointer to the global board. Board = moves + i
i = index -> in for loops.
Obviously my method only works on single threaded model. Slower method? Yes. But so simple. Bugs slow you down.
The thing is I don't need the current position ever. I just throw it away like trash.
Still don't understand. "i" is a pointer to the global board? And it iterates over global boards? Or where does it iterate over?
If it is a secret then never mind.
I also don't understand that you don't need the current position ever. O wait you create a new one each time.
It's not a big secret. I have explained it many times here. It's pretty slow as you said(And single threaded). That of course depends on the point of view. I'm a game programmer not a chess programmer. So I only care about source code.
So I only have 1 global board. And moves are per function. Should probably call them boards. But they also contain move_from, move_to flags. So they are kinda moves and boards hybrids. So (moves + i) points to the board on the list.
I don't generate moves at all. I generate boards. So I don't have make() or unmake() stuff to worry about. The code that doesn't exist. Contains 0 bugs and is really fast.
I don't reuse that current position after done operations. Because in unmake() one needs lots of logic to update all bitboards, hashes and stuff that's really bug prone.