Skip to content

the indexes of the squares should start with 1 so the last square is 64 for quick easy math #6

@bpayne111

Description

@bpayne111

the indexes of the squares should start with 1 so the last square is 64 for quick easy math

since the board is 8x8... having the squares start with 1 instead of 0 will be very helpful because dividing by 8 is very useful for calculating moves and since your squares don't line up very well with that number the math is tough because you need to add 1 to every calculation to accommodate the math so the calculations are quick and easy

i hope that helps

email me if i was confusing. i assure you this is very helpful information if you want to use bitboards to solve chess

one Important thing to take note of is how the operating systems handle 64 bit integers... some systems seem to use the last bit of a long integer (64 bit) for assigning negative values to the numbers...

if the systems are doing this.. then 1 square is likely useless unless there is something i'm missing...
as of now i'm calling this the 'the 64 bit signed long integer problem'

the value of a bitboard with all 1's in every bit location should be this number: "18 446 462 598 732 906 495"
but some system seem to have a max long int of 9,223,372,036,854,775,807... this is because the last bit is used for negative numbers.... which is very very bad for chess computers because they can't calculate one of the squares on the board (the last square (h8) usually i think?

luckily something does seem to accommodate this.. there might be an unsigned long integer variable type you can use?

i found this wiki article about languages that use unsigned integers... you might have to use smaller datatypes and combine them to get the 64 bit equivalent

you can search for the word 'unsigned' by hitting ctrl+f if you don't know how.. that will help you find the part of the document you need

https://en.wikipedia.org/wiki/Comparison_of_programming_languages_(basic_instructions)

i also found this article.. one reply might be helpful.. things can be confusing... check out the post where the guy says 'unsigned integers aren't useful' he might have accidentally been helpful without knowing it

https://stackoverflow.com/questions/40884030/how-to-declare-an-unsigned-int-variable-in-javascript

i'm going to copy the code and take a look at it myself and i might try to do stuff with it later

oh one more note... logic operators are likely confusing to you because they are kinda named backwards... take a closer look you'll see...

i have these possibly helpful notes on logical/bitwise operators that i hope are helpful to you:
*i tried to rename them for myself so i could think about them more easily because whoever made them seemed to do it backwards somehow.. possibly for security.. long story.. anyway.. i hope you can get your old bitboard stuff working..looks fun.. later

original OR gate = 1 or 1 = 1
*AND/OR gate = 1 and/or 1 = 1
xor = 1 only or 1 only = 1 = new OR gate

and for real.. email me and i'll help.. my eyeballs and etc won't let me code anything that works... would be nice to help you code with a shared screen on the discord app or something... never got a chance to do this stuff like i always wanted to so i'm workin on it now a bit

bpayne111@gmail.com

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions