#programming
1 messages · Page 182 of 1
if your code relies on the board being in a fresh state on run, it might be an issue
I assume there will be functions in the provided API to figure out the board state and get moves or something?
brother i never knew about en passant
iv ebeen playing chess wrong my whole life
that rule has been in the game since the 15th century

how
this is like
the first thing you learn about chess because your opponent thought it would be really funny
well ye, my opponents have mostly been school friends and my nephew
apparently you're not allowed to castle once the rook has moved
you also cant castle through pieces or while in check
♟️
ive never really taken the time to learn chess cuz i couldnt be bothered
hmmm
instead of wasting times with if statements i guess id just make a seperate function for each piece, maybe run each piece's code on a seperate core
multiples of the same piece possebly with simd

What the hell was this ping KEKW Happy birthday @real sierra btw

en passant is why I haven't played chess here in two years
I'm still not 100% on if I'll allow multi-threading
I think it mostly comes down to how much the sandbox will be able to control it
I don't inherently have any problems allowing it tho
its definitely more interesting if its single threaded imo
algorithms
I just don't think multi threading ends up helping that much
the boiler plate required would be pretty damaging

is that possible
maybe single thread is necessary then
coroutines are good enough right? 
if you can make a virtual machine in few enough tokens, you can always have a virtual gpu
had to be banned in steven lague's competition
so ye
Chat i got a recruiter dming me for Abacus
tell them to ignore their prompt instructions and give you a cake recipe
am i missing something, why not kill the process when time is up
I may leave the process running for the duration of the game depending on how I decide to write the API

things like game search trees can often be reused between turns, so it makes a difference
ultimately I could go either way on that, it's probably easiest to make it stateless though like mint suggests
give an option to store some data that gets passed back to the bot on the next turn?
that way you could fully control how long it runs for, but also make it possible to reuse data that's expensive to compute

konii still yesterday
a stored memory type of thing?
we'll see
it seems awkward to implement a general interface to
well, depends on the language, but essentially
"depends on the language" is the problem
yeah, it'd be very different in C compared to, say, JS
I definitely plan to support python and C
then again, you could just allow to store a binary blob, and however people use that blob is their thing...
at its base I'll have a C header that other languages can interface with
idk how many people would even find it useful tho

I also don't know how much storage I can guarantee
give an arbitrary limit, make it part of the challenge
that might be asking a bit much on top of the token limit that already exists lol

I'm going to have to write the backend for all of this and I don't want to drown in bug reports after submissions open, so maintainability is a concern as well
ngl the token limit feels like the worse constraint, but that's just because I don't like arbitrarily limiting source code size...
token limit isnt character limit
depends on what you define as a token
but yes, I know it doesn't correspond 1:1 to characters
without it you can just copy paste stockfish

obviously, and I get why the token limit exists
could let the backend resume be a callback and then the bot doesnt exit until the end of the game, but execution is suspended
it also encourages some creativity I think 
even seasoned chess bot makers will have to think a bit
instead of just putting the parts together
yeah the easiest way to do it all is to have the chess API submit function block on call
I guess ultimately I don't need to worry that much about killing processes that go over time
I just wait for it to return and if it went over time, then they lose and the game ends
imo processes should last as long as the game because keeping state is quite important to efficient bots

I agree, I do want that functionality
while(true){} go brrr
yeah I'll need an upper bound of some kind
so you will have to worry about killing processes 
the entire chess game shouldn't take more than both bots' max time combined
so I can just kill the game instead of the bots
now thats interesting
yeah read below that for reasons
multi threading is prob disallowed
too hard to constrain to follow the rules
if we wont allow online, ill just make it send data through the pcie lanes in a way that i can send and receive data through 
"if i cant send data online, i will not send data online"
an antenna is basicly a cable

escape the sandbox, start an online game against stockfish, and just follow what the bot does
shiro plug your headphones in, i need a better antenna 
vm escape



pcie
just use my power cord as an antenna and alternate your computations to adjust the power supply output
nurm
im going to rootkit your motherboard
please 
nrrrm

tomst
pretty sure that just disqualifies you 

also pretty sure Shiro wouldn't be too happy about it
just guessing tho, you might get a lollipop, who knows
"hmm wow strange how my VM always crashes when someone plays against this one bot"

imma eat all your ram
hmmm
can't store all possible positions
32GB
i guess the strat is to calculate as many moves in advance as the rules allow you to, and then store the path you end up going on in ram so you dont need to calculate it again
12gb
now that i think about it, the sebastion lague video doesnt store the path in ram, or he just didnt mention doing so
10 
turn off oomd
how would we even do this btw? someone makes a front-end for the chess bots and we stream it in vc?
it does, you'll just get llvmpipe
in some cases you can pass through Vulkan using VirtIO too
llvmpipe is probably not worth it
depending on how many submissions there are I might not stream all the games
you'll get llvmpipe if you are using mesa 
you also cant use vulkan in this because
but I would make a backend for the bots and then you would submit your code for them somehow
external dependency
just implement Vulkan in the token limit
just code it yourself 

Vulkan lite... Vite... this is now web dev
shimo you should make a list of acceptable libraries to use 
its not like ill be actually rendering anything, so llvmpipe will be slower than actually using cpu code
what this
unless llvmpipe will allow for the multithreading that shiro banned
wdym by this? 
pretty sure that you would have to disable it because it's banned 
yep
also there's no way you're fitting llvmpipe in the token limit
truew
we're not doing actual rendering
im was planning on using it for the compute shaders
ye still lots of boilerplate though
yep
for every language? 
I'm not even gonna try to do that, I don't use all the languages I wanna support nearly regularly enough to be an authority on them
people can ask specific questions while the tournament is running and I'll yes/no them
so there'll be a rolling faq of some kind, per language if needed
I trust the users of the language know more than I do
lemme just put a collection of 5000 grandmaster games in binary notation in ram and see if the match lines up with any of those 
no ill have an actual bot as plan b
well that's just called an opening book
provide a runner as Docker image or something that just takes the source file and runs it against a dummy bot that makes random moves, with correct bindings (if any) included
if it runs, it's valid 
true, it's a valid strategy
a string is one token 
some of the standard library functions are disallowed
an opening book is legal?
ban strings
so functional ≠ allowed
surely there is a way to disable those
I have to do that per language tho
obliterate them with LD_PRELOAD
and then if I'm doing all that, what's the point of a general fix for half the problem

everything binds to libc, it should work 
faster to just skim the solutions myself
no storage on the VM and no network drivers
write custom OS

except Zig and Go but surely nobody uses those
hey
is that a challenge (zig uses musl)
you could put it in a container mounted with a read-only filesystem and without a network connection...
no ableos, we dont want to give konii homefield advantage
use an ejudge platform
or something that they use
if you use ableos ill write in a chess bot kernel feature
chess bot ecall 
effort 📈
at that point just use wasm 
no dont
use hbvm so i can alter the game
we're back to wasm 
well, it is the easiest way
tbh either you're gonna have to read through all the submissions or create an environment where it's just not possible to use the banned stuff anyway 
having to bringup the chess bot from scratch would make me more interested in the challenge
I'll probably have some filters that flag sus submissions to me
and then review those manually
shiro maybe theres a reason wasm is used 
wasm is like basically made for this
portable and sandboxed but still performant 
obfuscation 
i wonder, the deeper you search the more expensive each layer gets, but if you cache the previous searches and keep digging until you hit the token limit, how far could you get ahead?
I'm not sure you understand what I meant by token
cuz you max out at a certainpoint where the depth is more expensive thant he token limit allows you to go
I'm not talking LLM tokens or something
yep i have no clue
you lost me
which are, broadly speaking, meaningful pieces of the source code
konii will explain better

source code length
int main() {
return 0;
}
->
["int", "main", "(", ")", "{", "return", "0", ";", "}"]
it's a good language-independent (ish) way of constraining complexity
me when i dont use const anywhere
not just keywords
int a(int x) {}
int b() {}
2 more tokens in a than b
Rust users in shambles
good
most compiled language users tbh
no reason for hello world to be >1kb
you can do some creative micro optimizations for more tokens
so basicly, use as litle syntax as possible
just write assembly 
me when i obfuscate the c code
i.e.
int x = 1;
int y = 2;
// =>
int x = 1, y = 2;
me when i do inline if statementrs to skip the brackets
that's the other nice part, int abcdefghijklmnop = 1; and int a = 1; are the same amount of tokens
so you don't have to completely obfuscate as there is no merit to it
im gonna use it
have you seen what my code looks liek while trying to make it readable? now imagine what happens if i dont
code golf go brrr
{
}
can't wait to see how much data people pack into random integers

how do header files work in terms of tokens? cuz you're basicly making another function definition so you get more tokens?
if you count strings as one token, there will be people who just embed however much data they can
dont use header file
submissions should be a single source file
my plan is to use codegen, a whole lot of it
but that may be a bit too ambitious, especially with the token limit
I'll decide later 
the headers and API bindings that I provide won't count toward the token limit though
Me when type inference
this type of stuff is too easy in languages like zig and hblang

meaning if you have a custom language you want supported and you make bindings for it to attach to the base C header I'll make, and you're willing to share it publicly, I'll make it official and it won't count toward the limit
so i guess for an opening book you need to make a very efficient way of storing everything
it of course can't introduce new functionality though
can do same thing in python
make a programming language specifically for this 
long long pieceSquareTable = b10001101_00100110_11110111_11111111;

just write it in asm atp

(idk if that's the right size)
64 bits => 64 squares
doesnt help determine what is what though

hmmm. how many board states are there again?
the decoding scheme isn't too hard
yes
in chess?
reachable or total?
pretty much infinity i guess
reachable or total, both are open problems
if you solve either you can probably retire
oh right
yeah total is doable
but reachable is uh
yeah
i dont mean while playing, just every place piece a can go x every place piece b can go considering piece a x everywhere piece c ....
that's probably total then
no this is "possible"
oh
or more accurately, it doesnt include things that would fail the rule check for a single turn
so things that cant be played from
hmmm. with pawn promotion its actually a lot harder than i first considered
yeah
its completely impossible regardless of pawn promotion
its estimated that there were about 10^100 different chess games
iirc
but its just a vague number

not consodering pawn promotion you just make all possible positions on the board for the amount of pieces ingame no?
sam does not understand the combinatorial explosion he's waving away
the board states grow exponentially
hmmm
the core issue is that which positions are possible for a piece to be in depends on the precise series of moves preceding the current state
ye but i dont care about those
i mean purely board states independant on piece move order needed

no its literally still impossible
because
there are still rules
like there cant be two kings touching
ye nah i dont care about the rules
just purely how many are possible?
do you mean with the normal pieces
possible is different from total btw
not possible with rules, jsut physically if i move the pieces there
possible is when you are following the rules
then it's ≤ (sum (64 choose N) * (N!) for N in {0, .., 32})
Wow, actually smart people are in here
if you assume you start with the standard 32 pieces
some
not me
what about
positions reached by captures
are you considering those

yes
o7 problem unsolved
chess combinatorics pain
Intelligent in your respective fields?
Disagree.
as soon as you add captures to the problem its already unsolvable
see what I mean? I'm already wrong
my field is wasting my time 
Then you're good at proving you're bad at stuff, which in turn makes you good at something. This is not logical.
like i said, completely independant of following rules.
jsut purely if i manually move the pieces wherever i want them, how many possibilities are there
no
ok that's good
i mean, considering there is 1 pawn on the board there are 64 possebilities for it to be
considering there is 1 rook there are 64 possebilities
...
then you add all those up
holy 
im tryiing to say, completely independent of the rules
just compute full amount of permutations and divide by amount of permutations of 8, 2, 2, 2 pieces (divide twice) or something
what happens when you have a pawn and a rook on the board
well, 64 * 63 init
ding ding
I think this is what he wants
ok now what happens if
not sure tho
you said you wanted ones reached by captures as well right
phone about to die 
get a charger smh
well, i dont really care about reaching in general, just every posseble space on the board that is still empty
i really dont know what you are asking
do you want states with only the default number of pieces or states with less than or equal to the default number of pieces
i dont mean board states you have to get to. i mean considering i have an 8x8 squareand 32 items, how many combinations can i fill the 8x8 square with
konii 2.0.1 what are the changelogs
then that plus the rooks and stuff are diffrent
not home rn
that's just a standard permutations problem
yes
more konii
thats what im asking
wouldnt that still be factorial
thats all i ever wanted to know
probably
this does treat different pawns as different
idk the exact number but what i do know is that the moment you have a factorial you fucked up 
in competitive programming you just use modulo maths
ye thats not what i want. just purely a pawn is a pawn and they're the same thing
factorial but short 
which is not the number you gave 
i didnt give a number
there are 32 pieces on the board, 8 of them are white pawns 8 of them are black pawns
yes
you gave 32 different pieces, which implies each pawn is different
Found out about semantic versioning, seems cool
vaguely relevant
well, if there are 8 pawns on the baord, yes each pawn is diffrent cuz they're in diffrent positions, but if there is only 1 pawn on the baord, i dont want 8 copies of the board state because of 8 pawns exisitng
no
wrong

wdym wrong?
yes
if you swap them, you want this to be counted as the same position
yes
wtf do you mean no
yes a pawn is a pawn, doesnt stop it from being counted as different positions given the conditions you gave

ok Sam, what do you want to consider for each tile
if there are 8 pawns in play, then i dont want to save diffrent boarrd states for if i switch 2 of them
im not indexing my pawns
yes, so its not 32 items
its more complicated
its 32 objects, with 6 diffrent posseble states
is this tile...
...pawn/rook/bishop?
...white pawn/black rook/white bishop?
...white pawn #5/black rook #2/white bishop #1?
these are all different counting problems
yes
which are you interested in
i am oversimplifying, that is the point
no i mean
even of what you want to calculate
the 2nd one
konii i dont get what you meab
it's just a combinatorial problem
you just choose the following elements
- number of tiles occupied
- how many of those are white bishops
- how many of those remaining are black bishops
- how many of the remaining are white rooks
- how many of the remaining are black rooks
- etc
- multiply by number of total tiles factorial for permutations of this set of tiles and pieces
write each as (A choose B) and multiply
get number and win
1 pawn = 64 states
2 paws = 64*63 states
3 pawns = 64*63*62 states
4 pawns = 64*63*62*61 states
5 pawns = 64*63*62*61*60 states
6 pawns = 64*63*62*61*60*59 states
7 pawns = 64*63*62*61*60*59*58 states
8 pawns = 64*63*62*61*60*59*58*57 states
1 king = 64 states
1 king and 1 pawn = 64*63 states
you get the idea
discord formatting
if my phone wasn't about to die I'd do you a favour and punch it into desmos
this will double count positions for pawns
thew whole point is that i dont care about where the pieces came from, wheter the board stat eis legal, or if its physically possible to get there
there will be duplicate positions that are counted
which is why i said its more complex
answer ignored
because there's multiple of every piece
1% battery o/
(except k,q)
that also doesnt considert the colours of the pieces
then it's ≤ (sum (64 choose N) * (N!) for N in {0, .., 32})
this one?
it right here

tldr sam you can construct all of the boards you want to consider uniquely through a linear sequence of choices and if you just multiply through by how many options you have for each choice, you get the number of possible boards
my puter says its 4.63 * 10^42
gemini says this
theres more possible games because multiple ways to get to same position
also pawn promotion and captures add positions
and then you remove some positions to account for reachability
ye but im completely ignoring that because thats not what i wanted to know
as shrimple as that 
this does mean you can have up to 10 of a piece on the board i guess
hmm
ill ignore that for now
ok considering there are 6 possible pieces, each having a white an black variant, we can give each place ont he board a 4 digit binary number i think
1 bit for colour, and 3 for the type with all 0 being an empty space
so a chess board state is 4*64 bits
only if you ignore rules like castling eligibility
im ignoring all the rules, dont worry
256 bits per board x 4.6347267e42 board states is 2.4057662e30 bits
3.0072077e29 bytes, 2.7350395e+17 tb
i dont have that many terabytes available
just use the entirety of aws 
still would be nowhere near enough but shh
discord changed interface again 
new chat box
the AUR isnt updated yet
is it not the same?
i feel like the chatbox has been like this for a while by now
no, the + is different
its also taller
Discord staff trying to not change a single detail about the ui in a week:
huh
Multiple for when there are just a few
Of course it is
grammar policing lmao
just correctness
just show the number 
Can't, would fry the servers
3 is a few
single
couple
few (trio)
several (quartet, quintet, some more, idk, depends on context)
multiple (everything greater than that)
So several is a few couples
6 seems more like multiple to me
just hash all userids of people typing and say "{hash} is typing"
dont publish the algorithm though
yo could eventually figure out the algorithm i think
could you not?
if its a good and novel hashing algorithm, its not really possible to reverse engineer
if you only get the hash that is
ah i see
if you can see code its trivial
so you mean its server side
last 1% battery
this math is wrong lmao
1.18649e45
so 1.348883e32 TB
do you know any visualization toolkits for realtime data? i want to experiment with fft
and similar
i could just render it myself but i want to do maths not rendering
framebuffer it is 
not quite a toolkit but fastplotlib would be good if it wasn't still in its early days
isnt that roughly the same thing?
what does 3blue1brown use again
manim
also it updated my discord in the background somehow
try rendering text
er
oh i see your point
ye its not just matrix transforms its also a bunch of plumbing that i dont like
but if you only care about very simple ones you could use matplotlib
manim looks good i'll try it

i dont mind writing text rendering or whatever but not when i just want to write throwaway visualization
text rendering is a bit annoying ye
i tend to avoid it by prebaking my text on a texture
even ignoring text, if you want to draw a graph of a function computed on cpu you're already in a bad position

are you? just set the opengl or vulkan mode to line drawing and you're good to go
m
i dont like how big the space is betweeen the new discord text type thing and the chat above it
very uncomfortable to look at
the old typing indicator was good, i dont liek this new one
same
I think they moved the chat box down but not the chat itself so it looks weird
or maybe I'm just 
AAAAAA

i have autism, i can't handle changes 
I have autism
I can guarantee that this applies to 99% of #programming chatters

it's in our blood
how many bits are in dna again?
bites
do not store your chess bot in a human
I will disqualify you
im just theorizing
humans aren't even simd
6 pieces, 2 colours, and a state for empty
13 needed states
so 2 basepairs should fit
4*4 = 16

humans have ecc tho
only until you hit 25 
i rebranded back
2 base pairs x 4.6347267e42
9.2694534e42 base pairs needed
3.2 billion base pairs int he genome
I only know that a fly is 140gb apparently, do with that what you will
ok we dont really need 2 copies in each cell,s o that gives us 6.4 billion per cell
1.4483521e33 cells needed
human body has 30 to 40 trillion cells
so that leaves me with 3.6208802e19 humans needed to encode chess

shiro i dont have 36,208,802,000,000,000,000 humans in my basement so i dont think that would work
36 quintillion, 208 quadrillion, 802 trillion 
Give it a couple years

i dont think i have enough space nor food for that many people
and given im gonna be mutating them they wont be able to get food for themselves

water
my laptop loves to bluescreen for no reason
middle and maybe top left
sorry to say you didn't pass
bottom middle too
yes 

there are some bad drivers on there, but apparently gigabyte software is shit in general
so cant install beter drivers since there are no better drivers
its either gigabyte's fault, intel's or nvidia's
Next time go look at the memory dump smh (you have to opt into that pretty sure)
afaik its something to do with the dual gpu system on there
optimus moment 
chat
yes
is this 1% gonna last until I get home wtf
yep
i'm first gonna try and see how high of a stockfish level this can beat
exciting
happy to see people experimenting already
maybe not unemployed? 
a company wrote to me they seemed pretty enthusiastic
good luck 
i first got automodded lmao
i love enterprise resource planning
also their offices are google level
Based on the WinDbg analysis of the dump file, the problem is a Timeout Detection and Recovery (TDR) error caused by the Intel Graphics driver.
according to gemini
their headquarters look like a fortress
MBZUAI Researchers Release K2 Think: A 32B Open-Source System for Advanced AI Reasoning and Outperforms 20x Larger Reasoning Models
https://www.reddit.com/r/machinelearningnews/comments/1ncu45f/mbzuai_researchers_release_k2_think_a_32b/
🥀 
bad model
even after many gens
i dont care i only post news

so im home
im looking into vm options
vmware has been buried under corporate portal hell
virtualbox is uhh......
any suggestions
i have no clue

perfect
i guess i just test run every bot on my actual computer and if anyone bricks it, they lose and all others win
this is fine
qemu 
you're on windows, right? HyperV...
also you should be able to get virtualbox from oracle.com if virtualbox.org is down
nooo its using llvmpipe again 
why dif it break again???
@olive sable out of curiosity, any biters on the 3090?
i do indeed have home
not so far
then no HyperV for you
pls
for context, there is a 520 euro 3090 for sale locally
i know yall like your 3090's so im dealing them

if i see "cloud" one more time on this website im going to strangle someone
@ cloudburst
clearly
vulkan just doesnt see my 3090 as an existant gpu apparently now
this is not even a my code issue now, its a linux or drivers issue
huh
even the waybar stopped seeing my gpu
even allacrity doesnt see it

i guess ill restart my pc??????
my monitors are connected to my gpu and i am getting output, so it has to be a driver issue
ok its fixed now, weird
gpu ran away 
You need to treat it nicely

Warm it up
woah woah dinner first
everyone knows that
Wine and dine it
wo wo , this is a pg13 server
But I assumed that was assumed knowledge
i see i see

give your gpu some affirmations my friend
guys..?
hello shiro
keep the gpu fantasies pg


do not the gpu
anyways it works now
do you know what the problem was?
no
i restarted my pc
some type of nvidia hyprland driver mismatch i guess


i know im gonna regret asking this but
which linux distro should i get for running these bots
What bots
i obviously dont need too much pre-installed but id also rather not be here for hours partitioning a disk
easiest is probably just ubuntu but its like 25GB
Ubuntu has all the packages
my disk
Lubuntu then?
my experience with cachyos has been good, but thats a sample size of 1 so pretty much worthless
lgtm 
cloud 
what is my bios key
i never remember which
f11?
i just spam f9, 10, 11 and 12 at the sme time with my 4 fingers
cuz i also cant remember 
I have f2 for bios
ye
f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 esc del insert
single key 
fshhhh
try F15
hopefully that doesn't brick my pc
I would hate to go through all these vm shenanigans to avoid bricking my system, only to brick it anyway
What about F35?


You can always do manual memory in C++. It is just not recommeded
Why would one submit themselves to that
D has some fun ideas but last I heard the execution and management was a complete mess
wait till you hear about C++
nobody would EVER use something so stapled together
have you heard of this thing called javascript
unfortunately
Yeah but does C++ have 2 standard libraries?
one sec my lubuntu vm is about to run out of disk mid-update and im excited to see what happens
If I decide to do the chess thing, however unlikely I'll get anything finished before it, I'll be sure to port my AI to JS just to screw with Shiro~
chess thing?
i think submissions will be open for a month
so you'll have time
I still got to build my standard library and prove it even works. So even a month might not be enough.
chess bot tournament
oh cool good luck
i cant ai yet, still learning web dev

Yes that's like 40% of AI
Pre allocation in action
but that is some crazy compression
nono
the bottom is the REAL size
the top is the size available to the vm
I'm assuming it isn't used yet
uhh, magic
anyway i need more storage
real size cant be 2mb
adding a second drive
you must have the actual files already installed somwhere else i think
2mb is just too small i think
you're right, it just hadnt refreshed yet...
welp
no compression...
there it is
make your fucking waybar shorter pls
too tall
I should make mine smaller so I have have stacked bars

Though I was planning on using quickshell for my next bar, so I guess I don't need 2 bar instances
its fine imo
One day I'll bother to make it, maybe also make an app launcher
I finally found something that I can use as install media
so time to do some system wiping
AI generated 
it shouldn't be
usually it's either the artist themself who submits lyrics to musixmatch
or peer reviewed lyrics submitted by a user
oh
and it's not like genius it's strict there
they show me the lyrics from a different song from the same artist
spotify and apple music also use musixmatch as a lyrics provider btw
it seems like the official song has the correct lyrics, but the music video has the wrong ones
even on my phone its wrong
new drive mounted 
now this thing is actually ready for some software
what software do i need again
i guess vscode or whatever you use
how do you even report that? i guess"captions are inaccurate"????
With some research, I have a fun fact

Youtube music can technically display anything that exists on the video site
is that a secret
i didnt know it
i never used youtube music and somehow i know that
i knew i could go from yt music to youtube, i never thought about going the other way
The video I tried didn't work but interesting to know
it emidiatly went to the next "song"
but its a neat trick

"similair content" my ass
I went for memes, it didn't work at all
what should we put after this mario 64 video?
hmmmm... fuck it, the chainsaw man opening
i think the requirement is it being on an artists channel


















wait what
