#programming

1 messages · Page 224 of 1

sage crag
#

cpu throughput with simd is much higher and makes things like ML viable

real sierra
#

well you know the contest rules and the intended compilation command so OK

#

feel free to use the knowledge you have to optimize your code

#

just dont optimize it so much that it breaks on my system or you wont get many points

sage crag
#

note that shiro wont actually be compiling the programs with custom cpu

opaque sigil
#

can you add -march=native to the command ReallyInnocent

sage crag
opaque sigil
#

yeah but there's so many flags

rigid timber
#

actually Shiro, can I confirm something with you? Deno has its standard library as hosted packages not included in the runtime itself, that's fine to use right?

opaque sigil
#

easier to just enable everything supported

real sierra
#

wtf is deno neurOMEGALUL

rigid timber
#

a JS runtime that has a non-ass FFI

sage crag
rigid snow
real sierra
#

deno seems to be an extension of js so i feel like it should be restricted to the js stdlib no?

rigid snow
#

oh you sweet summer child

opaque sigil
#

what stdlib

rigid timber
#

js doesn't have a stdlib, it depends on the runtime

rough bloom
#

"JS stdlib" glueless

real sierra
sage crag
opaque sigil
#

deno is the stdlib

rigid snow
#

ok so

real sierra
#

what is wrong with js

rigid snow
#

we shoudl just do node right guys

rigid timber
trim valve
#

what isn't wrong with js

sage crag
rigid snow
#

please don't read this

real sierra
#

regardless of being in stdlib

sage crag
rigid snow
#

it may as well be one entry

#

deno bad

#

because i said so\

sage crag
rigid timber
#

tbh I can totally use only the actual JS-language-only stuff without anything from the Deno stdlib, I just wanna know before I start writing anything mahiro

sage crag
#

cause that's how js runtimes work FlowerCatJAM

rigid snow
#

should i immerse myself into the hell that is node api for node c++ addons or whatever the fuck they call it

#

i'm so ready

sage crag
rigid timber
real sierra
#

building these bots for the tournament is going to be a nightmare huh

sage crag
#

or, i mean, most of it wont give you a special advantage

rigid timber
#

the data structures could also be nice...

sage crag
real sierra
#

i did put that it should be easy to build on my system

sage crag
#

evilShrug just disqualify anyone that fails to meet that

real sierra
#

so i guess if i have any problems i just ask bindings devs to fix them

rigid snow
opaque sigil
#

require docker images ReallyInnocent

rigid snow
#

requiring deno is.... yeah

sage crag
#

deno MyHonestReaction

#

bun MyHonestReaction

#

v8 MyHonestReaction

opaque sigil
#

deno is just a single static executable you'll be fine

sage crag
#

...javascript... MyHonestReaction

real sierra
#

i mean

#

is there anything actually problematic in the deno runtime

opaque sigil
#

not really

real sierra
#

that the other rules dont already disqualify

rigid snow
#

it's just obscure-ish

rigid timber
#

well the usual network and filesystem stuff, but that's banned anyway

#

could explicitly ban the GPU if you want to

rough bloom
opaque sigil
#

you can ban those within deno too

rigid snow
sage crag
#

in appearance

#

why did we go the c bindings route again

#

why did i suggest that

real sierra
#

yeah i think its fine to use the deno runtime then

sage crag
#

we should have limited it to c only

rigid snow
sage crag
rigid timber
real sierra
#

just for clarification tho, the gpu stuff is indeed considered parallel and banned

rigid timber
#

yeah, understood

sage crag
#

also async

real sierra
sage crag
rigid timber
rigid snow
sage crag
#

also this

rigid timber
#

that's under the usual banned network stuff

rough bloom
real sierra
#

honestly im rather impressed with how many languages there are bindings for

#

does async start an event thread

sage crag
#

async is background execution neuroExplode

rigid snow
#

neuroCatUuh no it isn't if the call is blocking

rigid timber
real sierra
#

if it was just single-thread coroutines that'd be fine

rough bloom
sage crag
#

single threaded coroutine is fine ye

rigid timber
#

async is single threaded unless you spawn a thread yourself through the runtime's APIs, that's defined as part of the JS standard

rigid snow
#

it doesn't. the only thing spawning os threads in js is workers

#

manually

real sierra
rigid timber
#

tbh async wouldn't be helpful anyway

#

since you'll spend most of the time searching moves

real sierra
#

i could see a producer-consumer pattern for producing move sequences and consuming them to evaluate, would make time management easy YES

sage crag
#

if search tend to terminate, the more searches you make the faster you will find non-terminating searches

rigid timber
sage crag
#

therefore async is actually useful

wide flicker
real sierra
#

( glueless )

rigid snow
#

or interrupts

#

or whatever

#

single threaded

#

period

sage crag
#

async doesnt typically have any meaningful gains unless you are doing IO anyway

real sierra
#

async sounds fine

sage crag
#

it is useful for long-running and early-terminating searches though so i think its a good idea to use it

#

you implicitly use it when typically programming searches though evilThink

opaque sigil
#

since when is this a thing on twitch Hmmm

real sierra
#

youtube 2

stray dragon
opaque sigil
#

better late than never i guess

#

putting this behind being a sub is crazy though

rigid snow
opaque sigil
#

ah

rigid snow
#

rolling out now probably since it says new

rough bloom
opaque sigil
#

apparently it being subs only is only for now

#

so that's nice

rough bloom
#

the current stream is also a VOD with a lag of a few minutes

opaque sigil
#

mhm

rigid snow
#

i mean i always just clicked the clip button to do that

desert wave
lapis wraith
opaque sigil
#

yup

lapis wraith
#

nise why they put this behind a paywall? neurOMEGALUL

opaque sigil
#

only for now apparently

lapis wraith
#

SMH the Corpa is strong with this one

opaque sigil
#

sth sth they want to make sure it doesn't get used to bypass ads enub

#

which idk how that'd even work but fair enough i guess

midnight sigil
#

Twitch is losing its money cuz no one is paying for their services. Youtube on the other hand has Google at the back

jagged turtle
#

isn't twitch backed by amazon or is amazon also going in the dumpster fire rn

midnight sigil
#

neuroShrug big corpa are weird

rigid snow
#

different entities, different bank accounts, different incomes and expenses

jagged turtle
#

business relations are weird

#

oh well

rigid snow
jagged turtle
opaque sigil
rigid snow
#

oh my fucking god it's impossible

#

i can't figure out a way to make it compile c as c

jagged turtle
#

???

rigid timber
#

lmao

opaque sigil
#

you mean c++ as c right

rigid snow
#

no

jagged turtle
#

me when i can't compile to the same language i wrote it in

rigid timber
#

lemme guess, it really wants to compile as c++

rigid snow
#

yes

#

exacty

jagged turtle
#

💀

opaque sigil
#

isn't v8 c++ only or am i missing something

rigid snow
#

it shoves /std:c++20 into the c dep

rigid snow
rich ibex
#

least disruptive pr

rigid timber
#

Hmm actually can't you compile chessapi as c++? doesn't it have some c++-aware stuff in there?

opaque sigil
#

ah there are some issues

#

it won't compile

rigid timber
#

that's a pretty big issue icant

opaque sigil
#

some implicit conversions

#

yknow what i may as well fix this and make a pr

rigid snow
#

that's fine in c though and should not be an issue if you compile it as such

#

i also got errors in threads.h of all fucking places

opaque sigil
#

c++ is stricter when it comes to pointer types and type conversions

#

you have to explicitly cast void* to whatever pointer type you want

opaque sigil
rigid snow
#

not anymore nvm

rigid snow
opaque sigil
#

yup

#

@real sierra i made a pr so the chessapi.c compiles with c++ compilers too, feel free to merge if you want to (it's just a bunch of type casts) neuroDinkDonk

rigid snow
#

Someone else would have to test with msvc if they care
i'm running into the threads.h thing again

#ifdef __cplusplus // TRANSITION, [[_Noreturn]]
[[noreturn]] void __cdecl thrd_exit(int _Res);
#else
_Noreturn void __cdecl thrd_exit(int _Res);
#endif
``` basically i somehow end up on the `_Noreturn` macro even though i'm compiling as cpp
#

i don't even know at this point

opaque sigil
rigid snow
#
static inline int __cdecl thrd_sleep(const struct timespec* duration, struct timespec* remaining) {
    return _thrd_sleep64((struct _timespec64*) duration, (struct _timespec64*) remaining);
}
``` oh and it doesn't like this too
#

is defining functions in headers even ok

#

in cpp

opaque sigil
#

it is

#

there's nothing special about headers they're just a convention

whole tulip
rigid snow
#

oh the vs install is probably in russian because at some point i downloaded it from a russian ip

#

that would make sense

opaque sigil
#

i can't believe i'm unironically trying to install visual studio via wine now

#

what has my life become

rigid snow
#

why

#

don't

opaque sigil
#

too late enub

rigid timber
#

pretty sure it does

#

or at least should

opaque sigil
#

also speaking of wine

#

i found out the other day apparently if you install specific combinations of packages in the same prefix it can kill the kernel enub

rigid timber
#

lovely

amber fractal
#

I remember trying to install software on wine only to have to try and install it

#

I swear I was trying to run python as windows for some reason

#

I remember so many errors and giving up on that

opaque sigil
jagged turtle
#

windows huh

dusky crater
opaque sigil
dusky crater
#

I tried the MSVC package in the AUR once. The errors were something to behold

real sierra
opaque sigil
#

it's literally just casting the return value from malloc and casting some ints to the enum types

real sierra
opaque sigil
#

there was another change i made about some scanf's return value being unused but i removed that from the pr

real sierra
#

I fear the merge conflicts my other branch will suffer salute

opaque sigil
real sierra
#

is it even worth resolving or do I just reimplement it all neurOMEGALUL

opaque sigil
#

the pthreads only one?

real sierra
#

it's pthread and threads

#

supports both

opaque sigil
#

right

real sierra
#

unsure if it works or not tho

#

was considering expanding it to just use win32 threads as well

opaque sigil
#

at that point you may as well neurOMEGALUL

real sierra
#

because windows just doesn't support anything else reliably

#

it means testing will be a pain in the ass

opaque sigil
#

mint was hitting some weird errors with msvc in c++ mode around threads.h too apparently

rigid snow
#

the errors are fucking nonsense

#

i’m heading to sleep gn

#

forget about the errors

real sierra
#

supporting pthread and win32 threads should be enough for all platforms

#

mac and linux should both be POSIX compliant

#

and win32 is... yeah...

#

future problem anyway

#

fixes may come tomorrow as today has proven to be quite busy irl Deadge

#

I can review some PRs tonight but probably not write code myself

tender river
#

its fine to update it i just used 8 because shiro had it on ubuntu

sage crag
#

awa

opaque sigil
#

okay i give up with msvc neurolingSlep

silent cloak
opaque sigil
#

i was trying to get msvc working under nixos to debug some things enub

silent cloak
#

Msvc is notorious for giving shit errors

opaque sigil
#

the installer doesn't like my wine

sage crag
#

wait, only 3, 5, 7

silent cloak
#

Lol

#

It is certainly one of the ones people tend to avoid

sage crag
#

how about 3, 4, 5, 7

silent cloak
#

I used to use MinGW as an alternative and now on the rare chance I use C++ ill use clang

tender river
silent cloak
#

The real legends just ask chatgpt to compile it

sage crag
silent cloak
#

I should try that tomorrow actually

real sierra
#

i just install every compiler OK

#

try all of them

silent cloak
#

Make a shell script to build

tender river
#

they have a separate type for that (std::bitset) but it's fixed size only neuroExplode

#

evilNodders i know thebodiesareintheceiling

#

nERMd these are actually 18 bytes per token, you can use "\x57\x1e\xab\xb8\x64\xe9\x9b\xc1" though which is 8 bytes

silent cloak
#

Make a program to calculate the best method

tender river
#

evilNodders me but nothing changed for me since i never programmed chess bots

#

sam misinfo evilSMH

stray dragon
#

smh

#

rulebreaker

silent cloak
#

C devs storing everything under single letters

tender river
#

the rules explicitly disallow using them for storing data

stray dragon
tender river
stray dragon
#

shiro said no issues i trust shiro

tender river
stray dragon
#

anything but making it as horrifically unreadable as possible

tender river
silent cloak
tender river
#

@real sierra please confirm a string literal with 18 characters is too long neuroDinkDonk

stray dragon
#

i'm gonna cry

opaque sigil
silent cloak
#

Everything must be single letter with no context or help to anyone reading it

stray dragon
#

my 12 tokens that i save with this method

#

gone

#

evaporated

#

how could you

real sierra
tender river
#

t rewrite neuroGun

stray dragon
#

NOOOO

silent cloak
#

Rip bozo

stray dragon
#

make less exploitable strings

#

you are the worst

tender river
#

neuroNope me the best

stray dragon
#

NOT ALLOWED

#

BANNED

#

YOU CANNOT USE THIS!!!

tender river
#

this is allowed as it doesnt encode info evilNodders

silent cloak
#

Doesn't want hashing

stray dragon
#

i was only getting 64 bits of info from each of those strings

#

man.

silent cloak
#

Make an array of the string then

tender river
#

evilHeyGuys skill issue storing 8 bytes in 18 bytes

silent cloak
#

Char array

stray dragon
#

how do i even convert that to ulong...

sage crag
#

why dont you build the string token counter into toknt

stray dragon
#

i guess there's that other way

tender river
real sierra
stray dragon
#

but i don't like it

#

mmmm

sage crag
#

that way people can use strings without getting undercounted

tender river
#

efficient

sage crag
#

if people have issue they can complain evilShrug

#

then they can submit pr

tender river
#

they can complain even if they dont have issues evilNodders

sage crag
#

i would share it with you but i dont need you getting an edge

tender river
#

not a bad idea to make includes one token but context sensitive lexing MyHonestReaction

stray dragon
sage crag
stray dragon
#

it's too late

sage crag
stray dragon
#

i have an option

#

i do wonder what adding python to this shit would let me do.

#

probably not that much actually

#

nevermind fuck that

real sierra
#

compress the weights and extract at runtime

stray dragon
#

i'll just go with the annoying option of having c*mmas

stray dragon
#

that is

#

literally

#

what i do

real sierra
#

tokens...

stray dragon
#

each one of those ulongs is 38 parameters

real sierra
stray dragon
#

could make it 40 per ulong but would actually cost extra tokens to do that

magic drum
#

Trying to compile the C version of the chess api on Windows, I am running into "threads.h" being missing. Is there a recommended route to avoid this? The change log claims that as of a couple days ago Windows should be working but Mac OS still has this issue, but I'm not on Mac

stray dragon
#

that's the method we've found

real sierra
#

known issue unfortunately

stray dragon
#

damn it i thought i was so clever putting the ulongs in strings and doing this to extract them

#

included in stdlib as well

tender river
magic drum
#

clang also says it's missing threads.h, is there something else needed on top of that?

stray dragon
#

uhh

tender river
#

and did you pass -std=c23

magic drum
#

version is 21.1.1-1, and no I did not pass that

stray dragon
#

he's superior

#

how

opaque sigil
#

Old ass version

stray dragon
#

literally what it installed with the visual studio installer

#

few days ago

opaque sigil
#

Yeah from 2022 enub

stray dragon
#

bruh

opaque sigil
#

The latest stable version is 21.1

#

You'll have to download it separately if you want it

stray dragon
#

i am making the executive decision to ignore it

#

probably fine™

opaque sigil
#

It's fine

#

Well assuming shiro doesn't use any weird c23 features

tender river
#

shiro does Neurorb

magic drum
#

What is -std=c23 supposed to do for me? Didn't seem to make a difference

stray dragon
#

i'll test on linux in the proper environment when i feel it's about ready

tender river
#

but they were unofficial features before c23 either way

stray dragon
tender river
magic drum
#

pacman -S mingw-w64-x86_64-clang in MSYS2

tender river
magic drum
#

I tried gcc first, switched to clang because it might have threads.h

tender river
real sierra
opaque sigil
#

Guess they don't ship that for mingw huh

real sierra
#

random relevant reddit post?

#

maybe has answer?

tender river
real sierra
#

just support one more threading method

#

it'll fix everything just one more

opaque sigil
#

Honestly just accept your fate and make a layer on top of pthread and win32 threads

real sierra
tender river
#

if only there was some sort of header in the standard that allowed you to write cross platform threading code

opaque sigil
#

Yeah if only

real sierra
#

"everyone supports threads.h!"

#

nobody supports threads.h

#

🪟 Tssk "nuhuh we dont wanna use stinky pthread"

#

🍎 Tssk "nah we dont like threads.h"

#

🐧 👍 "use whatever idc"

tender river
#

🪟 threads.h is supported or isnt idk we havent decided it depends on your compiler

opaque sigil
#

Sometimes I wonder how much pain could've been avoided by using <thread> instead

tender river
#

evilNodders std::thread is well supported

opaque sigil
#

Shouldn't be too bad to make a c header and the implementation in c++

real sierra
#

eww c++

tender river
#

i love c++ NeuroBounce

opaque sigil
#

Shiro you can just treat it as c with actual cross platform threads

real sierra
#

Susge can i..?

opaque sigil
#

Yes

tender river
real sierra
#

example me Susge

tender river
#

rename .c -> .cpp

#

done

#

its now c++

real sierra
#

but if i go down the slippery slope people will make me rewrite the entire thing in cpp features

opaque sigil
#

Well your current version doesn't compile as c++, hence my pr

real sierra
#

i dont know enough cpp for that

tender river
real sierra
#

ill just solve it myself OK

tender river
real sierra
#

i just need to abstract the synchronization primitives with clever macros

#

and provide a windows.h derived impl

#

and a pthread.h derived impl

#

and then i win Happie

tender river
#

that reminds me

#

in windows 11 they changed the layout of CRITICAL_SECTION

#

they didnt make it bigger

#

but they started using more of the bytes in there

#

which broke some legacy code evilWheeze

real sierra
#

idk anything about windows.h

#

i dont know if i want to MONKA

tender river
#

i only know from reverse engineering windows code that CRITICAL_SECTION is windows mutex

#

idk how you'd do cvs

#

CONDITION_VARIABLE

#

how convenient

real sierra
#

surely its more abstracted than this

opaque sigil
#

wdym, that's identical to the other version

real sierra
#

there is one part i kinda dread

#

which is the typing for the function the thread runs

#
DWORD WINAPI MyThreadFunction( LPVOID lpParam )
#

like what is this trash Deadge

tender river
#

WINAPI is more or less __stdcall

#

(which just means uh, not __cdecl)

#

LPVOID is void*

#

tokens NeuroBounce

#

and DWORD is just 4 bytes (unsigned)

opaque sigil
#

16 bit words neuroPogHD

tender river
#

evilNodders it stands for double word

real sierra
#

this is silly to have to include in code tho

opaque sigil
#

Isn't that signature identical to the one in pthread_create

tender river
#

even though modern words are not 16-bit

real sierra
#

why cant the windows compilers abstract it all

opaque sigil
#

Because yes

#

At least their docs are pretty nice

tender river
#

LPVOID stands for long pointer (i think) but on modern platforms no difference between short and long pointers

#

its kinda incredible how far back winapi dates

#

linux just relies on source code to update programs for new library versions but windows like actually kept the api mostly stable ever since the 16-bit days

opaque sigil
#

For better or worse

tender river
#

its not an issue with the kernel, "just" with the entire ecosystem around it

#

and honestly i dont really mind it

#

i dont like every windows app shipping its own dlls

magic drum
# tender river if all else fails wsl will just work

What's wsl? Sorry for all the basic setup questions, I haven't done C on my PC before (obviously), but Python C and C++ are the only available languages that I have experience with so it seems compiling the c version of the api is unavoidable despair

tender river
#

windows subsystem for linux

#

its just a way to have a linux environment on windows

tender river
real sierra
#

-# (oops sorry for ping)

tender river
#

its ok enub

real sierra
#

what is the most portable "hello world" possible

tender river
real sierra
#

nope

tender river
#

and how is portability defined, binary or source portability

magic drum
#

I'm not stressed about a time limit (I know regardless of how much time I have I'm not going to produce anything that competitive, I'm just doing this for fun and experience). Trying to solve all these problems is an adventure of its own I guess neuroFish

sage crag
#

i so tired

real sierra
#

binary

sage crag
#

not slep

#

no wanna

tender river
#

sleep sleep sleep evilHyperYay

sage crag
#

need

real sierra
#

like, can you polyglot the binary to run on multiple architectures

sage crag
#

code

tender river
real sierra
sage crag
sage crag
#

sometimes not

tender river
sage crag
#

me busy

real sierra
sage crag
#

wait maybe

#

what code

real sierra
#

no it ok

#

u busy

sage crag
#

not that busy

#

just writing spec

tender river
sage crag
#

smog

real sierra
#

@stray dragon wanna exchange trade secrets

#

I think if we share C code hacks

#

we can mutually benefit

#

despite my extensive research, most online C code golf knowledge is for source length, not token count, and often runs counter to the goal

#

I think the real token saver knowledge is all bespoke

tender river
#

i'm working on making c toknt count include names as 1 token

sage crag
#

&&

tender river
#

||

stray dragon
tender river
#

neuroNope can just replace <> with ""

real sierra
sage crag
#

^^

tender river
sage crag
#

!!

real sierra
#

I think you are pretty locked into using a different method than I am

sage crag
#

terminating not

real sierra
#

so I think there's minimal code theft risk

stray dragon
tender river
#

🍞‼️

stray dragon
#

i'm procrastinating to unlock myself

real sierra
#

hiding my code from t

#

you don't want this it's so many tokens

#

it even performs badly

sage crag
real sierra
#

yeah you don't want my code

sage crag
#

koni macro abuser

real sierra
stray dragon
#

i'm sure it performs like shit

tender river
sage crag
#

#define fl_bytecode(x) x(tex, 0, 0) x(evc, 1, 0)

real sierra
sage crag
#

hlt is so boring tex is better

real sierra
#

along the critical line it usually hits depth 6 ish I think

sage crag
#

🐛

#

nopy

#

nopy

stray dragon
#

damn ok

real sierra
#

🎷

stray dragon
#

so all i gotta do is hit depth 8

#

got it

real sierra
#

what's your time management like t

sage crag
#

its easier with alpha beta pruning

#

than mcts

real sierra
#

your bot's*

stray dragon
sage crag
stray dragon
#

oh

#

because the answers in order would be "horrendous" and "i still haven't actually run it with my code yet"

#

i think pretty good though?

real sierra
#

you haven't run your code yet?

stray dragon
#

nope.

#

procrastinating

#

i have to rewrite it all into the bot

#

make sure it all compiles and follows the rules i didn't consider

real sierra
#

I see

stray dragon
#

will have to edit a lot, and i also want to redo the search algorithm

#

add better pruning, instead of just doing "remove a fraction of the least promising paths" every step

#

maybe, if i have space, add in a transposition table, so i can cache the evals

sage crag
#
#include "stdint.h"
#if __STDC_VERSION__ < 202311L
#include <stdbool.h>
#endif
stray dragon
#

would probably take a lot of fucking around to shave down to that point though :(

real sierra
#

TT very cheap in tokens

safe path
tender river
real sierra
#

it's just a problem for me because it turned my tree into a graph

stray dragon
#

maybe 2/3 of searches

real sierra
#

the notion of "parent" node no longer applies to my game tree

stray dragon
#

probably?

real sierra
#

literally any board where you have two moves that can be done in either order

#

TT cuts that work in half

stray dragon
#

but like

#

it's only half

sage crag
real sierra
#

it turns out its really easy to repeat positions you've already done

tender river
#

unused header neuroDeadge

stray dragon
#

also: my method prunes a fraction of the trees at each pruning step

#

it actually would be about half or so between the bot's turns

#

a bit more from doing the multiple searches within each turn

#

so i'll say 2/3

#

still significant though

#

actually... within endgame, cache hits would probably increase

#

hmm

real sierra
#

earlygame and endgame are where i see the most cache hits

#

and while it might seem insignificant to worry about opening moves, if your hash moves are strong enough you might even be able to cut down on time spent on the opening

#

having extra time later could give you a win even against a better bot

stray dragon
real sierra
#

earlygame and endgame are where i expect the most cache hits

stray dragon
#

ah

real sierra
#

i think i wanted to say "could see"

#

load bearing qualifier

stray dragon
#

earlygame i can 100% understand

#

especially if it carried over the cache between games

real sierra
#

even if not, the cache being carried forward within the same game is worth a lot

#

if you search up to 8 plies ahead, and then you make a move and black makes a move, there's still 6 plies ahead worth of cached moves

stray dragon
#

yeah

real sierra
#

unless the opponent did something truly wacky, i dont think the moves you're checking will change that much

stray dragon
#

i'll simply have to see

real sierra
#

why am i helping the competition Pointless

stray dragon
#

i'll help later it's an investment

#

trust

real sierra
#

lectures cancelled tomorrow LETSGO long weekend

stray dragon
#

make a bot so awful to replicate that nobody will want to try

real sierra
#

im amazed how many tokens it uses for how few features it implements

stray dragon
#

yeah seeing how many tokens my neural net takes up hurts

#

especially the part where it's slotted into the eval function properly

#

was at like 500 tokens just for that + eval function, and that was before realizing the rules and compile issues

#

i think i need to trim stuff

#

horrible :(

timber acorn
#

so is it impossible to process that with neural net within 1k tokens?

stray dragon
#

i mean

#

no

#

not at all

#

it's entirely possible

tender river
#

its possible but the net's gotta be pretty small

stray dragon
#

but it doesn't leave as much room as i'd like, with the implementation i have

tender river
#

or maybe you can use 1.5-bit neural network neuroThink

stray dragon
#

yeah mine has 1020 parameters

tender river
#

either way you'll have to use some unconventional approaches

real sierra
#

creativity is the name of the game

stray dragon
#

weights can each be -1, 0, or 1

real sierra
#

how to get maximum chess performance from a fixed token budget is a very abstract problem

stray dragon
#

seems to have good performance

timber acorn
#

gpt says even 16k is not enough for an able-to use nn 🙁

stray dragon
#

gpt is wrong

real sierra
#

gpt doesnt know anything

stray dragon
#

i've implemented it myself

timber acorn
#

i know

stray dragon
#

i will do updates on it though

#

i feel the key to making it work well is to have it adjust the big numbers that get summed into the evaluation

#

takes them in as inputs, spits out factors that it multiplies them by, sums them, that's the evaluation result

#

by "big numbers" i mean material, mobility, etc.

#

king safety

#

pawn structure, maybe

#

that way, it skips having to figure out what the inputs mean, and can do away with all the abstraction you'd normally want for a neural network like that

sage crag
#

or referred to as such

stray dragon
#

1.58 bit i've seen

sage crag
#

yup

stray dragon
#

chayleaf said 3 bit initially so i corrected

sage crag
#

you can keep going forever

#

its log_2(3)

stray dragon
#

ok no need to get too specific

sage crag
#

hi

#

since your network is ternary

#

have you considered

real sierra
#

you know

#

we're kinda like the bots, in a way

#

our search space is code strings instead of games

sage crag
#

you can pack the entire network into a base-3 integer

real sierra
#

and our time limit is a token limit

sage crag
#

and then write its binary representation

stray dragon
#

i already do this.

sage crag
stray dragon
#

that's how i compress my parameters into ulongs

#

38 parameters (40 - 2 for token reasons) per 64 bits

sage crag
#

you can also try packing 5 trits into a byte

#

with smaller networks its more optimal

stray dragon
#

wait

#

i can just do that still

sage crag
#

duh

stray dragon
#

and it would actually save me tokens potentially.

#

even from the current method that is illegal.

#

huh....

sage crag
#

on the unpacking perhaps, you would need to write a python encoder though

stray dragon
#

no

#

i wouldn't

#

i could just

#

take the characters as ints

#

and use the same ternary unpacking method i use already

#

but with less iterations per number

#

and i could remove the string parsing function in its entirety

#

meh i'll do it tomorrow

#

probably

sage crag
# stray dragon meh i'll do it tomorrow
trits = [-1, 0, 1, 1, -1, 0, -1, 1, -1]
out = bytearray()
i = 0
n = len(trits)
while i < n:
    block = trits[i:i+5]
    while len(block) < 5: block.append(0)
    val = 0
    mul = 1
    for t in block:
        val += (t + 1) * mul
        mul *= 3
    out.append(val)
    i += 5
print(list(out))

trits = []
for b in out:
    val = b
    for _ in range(5):
        val, d = divmod(val, 3)
        trits.append(d - 1)
print(trits[:n])
#

all you need to do with out is convert it to ulongs from here, not my problem

stray dragon
#

ez

sage crag
#

you could also try arithmetic numeral systems

#

probably rans

stray dragon
#

what

sage crag
#

sorry i mean asymmetric numeral systems

#

5am

stray dragon
#

ideas!!!

tender river
#

neuroDinkDonk some compilers have char as unsigned char and some as signed char

stray dragon
#

chayleaf you might have helped me.

stray dragon
#

probably still worth

sage crag
#

at asymptote at least

tender river
#

you can just say signed/unsigned explicitly but +1 token neuroSadA

tender river
stray dragon
#

this is looking like... 6 extra tokens added, 22 tokens removed, a few added and removed elsewhere for the other non-ternary params

tender river
sage crag
#

ye ye

stray dragon
#

man.

#

ok

tender river
stray dragon
#

that feels so obvious

sage crag
stray dragon
#

damn it brain

sage crag
#

you dont need stdbool either

#

since c23

stray dragon
#

i don't

#

why would i ever want stdbool

tender river
#

could use _Bool even before c23 evilNodders

stray dragon
#

i never added it i'm not shiro

real sierra
#

GIGACAT stdbool enjoyers

stray dragon
#

cope

#

0 and 1 my beloved

#

bool is smelly

#

shiro stinky

sage crag
#

where did my vm go

tender river
stray dragon
#

yum

#

ate it while i was distracting you

sage crag
real sierra
#

t wouldn't have eaten it if it had stdbool

stray dragon
#

true

#

it's like putting raisins in a cookie

real sierra
#

i should've figured you'd be all-in on this contest

stray dragon
#

why would you ever do that

real sierra
#

even your username is minimum tokens

stray dragon
#

LOL

tender river
#

shiro its normal to have a 1 token username

sage crag
#

shimo did you know about flexible struct members

real sierra
#

about what

#

do you mean unions

sage crag
#

nope

#
typedef struct {
  uint32_t len;
  uint8_t data[];
} Erm;
#

data isnt a pointer

#

its a flexible struct member

stray dragon
#

konii out here pulling C tricks out of a hat

tender river
#

some old compilers complain when it isnt data[0] or data[1]

#

but ye you can do that mahi equivalent of rust's !Sized types

real sierra
#

i dont even know what that means

#

you've defined it in terms of itself

tender river
#

its a struct with an arbitrary size

real sierra
#

ffi's worst nightmare

tender river
real sierra
#

"how big is this struct?"

#

¯_(ツ)_/¯

#

as big as it wants to be ig

tender river
#

not any worse than opaque types

real sierra
#

nuhuh opaque types are best

#

then u dont have to worry because u cant

#

its a pointer

#

NFI

tender river
#

you dont have to worry about this struct's size either

#

it doesnt exist

real sierra
sage crag
#

struct is opaque to ffi anyway

tender river
#
struct {
  int len;
  char x[];
} *s = malloc(sizeof(int) + 256);

s->len = 256;
for (int i = 0; i < s->len; ++i) s->x[i] = i;
sage crag
#

you can actually also use sizeof(T)

tender river
#

not here deliv

sage crag
#

you not define struct SMH

real sierra
#

bblblblblblbllbllllblbl

tender river
#

branch and link

stray dragon
tender river
tender river
#

job application time

tender river
real sierra
tender river
#

windows supports it too

#

linux didnt have to since it doesnt rely on binaries but on source code

#

but it didnt gain traction

#

makes me wonder

#

could you make it do #!/usr/bin/env bash on linux

#

but be pe on window/macho on macos

tender river
#

then you could patch the elf depending on cpu architecture from within bash

#

not implementing it btw frogsmog

gloomy yoke
#

my bot is getting a lot of disconnects on cute chess, how can I check where and waht is going wrong?

real sierra
#

a disconnect is usually indicative of your bot crashing somehow

#

is it disconnecting immediately, or seemingly at random?

gloomy yoke
#

fully random

real sierra
#

i dont think there's a super clean way to identify the cause without much more information

tender river
#

i wonder if theres a way thats easier to debug (with stderr logs at least)

real sierra
#

running it in a terminal and feeding it UCI commands manually will let you see what kind of error it is

#

but that could take a while

#

and is annoying if you dont know for sure what caused the error

gloomy yoke
#

sometimes even the bot the plays random gets disconnected

real sierra
#

even the random bot?

#

when did you last grab chessapi.c?

gloomy yoke
#

the last time you updated it prety sure

real sierra
#

also just to be sure, which operating system and language are you using

gloomy yoke
#

w10 python

#

must be the way I made this dll

tender river
real sierra
#

if you happen to resolve those issues, or pinpoint a more exact cause, let me know

#

windows is notoriously difficult for everything

#

and the python bindings have a few known bugs that are being fixed soon

gloomy yoke
#

okay

analog sentinel
#

programming

tender river
real sierra
tender river
real sierra
tender river
#

nope

real sierra
tender river
#

wait no

analog sentinel
real sierra
#

Deadge linear algebra is the bane of my existence

#

lost to basis again

#

cannot build an intuition for basis no matter how many times i encounter it

tender river
analog sentinel
obsidian mantle
tender river
#

its a single number (though you cant really enter it as a single number as per the contest rules)

#

then you decode that number based on expected probabilities of symbols in the message

#

just read about huffman coding if you want something simpler to get an intuition of how compression works

thick imp
#

haha c# go brrr

velvet crestBOT
#

You have unlocked new role

thick imp
#

what

tender river
obsidian mantle
#

But you decode with formula

#

I'll read this huffman thing ...

tender river
#

all programs are formulas

thick imp
#
    // Convert one array to a Set for faster lookup
    const set2 = new Set(arr2);

    // Filter arr1 to only elements that exist in set2
    const common = arr1.filter(item => set2.has(item));

    // Remove duplicates if needed
    return [new Set(common)];
}

// Example usage
const array1 = [1, 2, 3, 4, 5, 6];
const array2 = [4, 5, 6, 7, 8, 9];

const commonElements = findCommonElements(array1, array2);
console.log("Common elements:", commonElements);```
tender river
#

you can use new Set(array1).intersection(new Set(array2))

#

also you forgot ... in list expansion

gloomy yoke
obsidian mantle
#

You have to be sure that index actually has a piece in current board

tender river
#

not really its fine for it to return 0

#

its a python bindings issue

#

it will get fixed

obsidian mantle
#

Because 0 is valid return for no piece

#

Python uses 1-based arrays? neuroD

tender river
obsidian mantle
#

Then how can it crash anything

tender river
#

a lot can happen at ffi boundaries

#

(in this case its just enum conversion and shiro forgetting what his own function can return)

obsidian mantle
#

So 0 isnt properly handeled within the python binding?

#

Inside of it

tender river
#

mhm

gloomy yoke
#

I get this in my logs
ERROR: 0 is not a valid PieceType

tender river
gloomy yoke
#

yea I will wait

#

yea, just had to change the api and it stopped crashing

tender river
#

this is likely how it will work in a future api version

real sierra
#

willfix ✅

#

finally time tomorrow, no more assignments and class cancelled

#

now I eep NeuroSleep

#

goodnight chess channel

olive sable
#

Goodmorning neuroWaveA

tender river
#

shiro

#

unshiro

nocturne olive
#

Went looking for if the Chess API was broken

#

Found peak instead

olive sable
#

I have 2 hours of math today

#

But its math i learned 3 years ago, so my motivation to go to school today is non-existant

nocturne olive
#

So does Chess API still work or did you explode it?

tender river
wide flicker
#

SCHIZO chess

nocturne olive
#

have something not related to Chess for a change

jagged turtle
#

this channel became #chessbot

#

or smth idk

olive sable
#

yep

wide flicker
#

meanwhile im just tryna get bazzite and obs to play nice (PipeWire hates me)

faint sandal
#

chess SCHIZO

midnight sigil
#

chest

sick owl
#

I wouldn't be surprised, they churn out updated checkpoints of each model gen over at google

obsidian mantle
#

Surely i will make it beat random bot every time this weekend glueless

#

Also is 3fold draw check not working or is it me

faint sandal
#

maybe it's time I got a new type c hub uuh

obsidian mantle
#

duct tape it nwero

faint sandal
#

mhm 65w going through that wire

obsidian mantle
#

typeC.png evilHEHEK

lilac lantern
#

Huh? Which one

obsidian mantle
#

It looks weirdly alligned

#

Compare it to other ports

#

Oh i think thats the reflection

#

Or what is that, a dust clump

faint sandal
#

it's supposed to be a type c port

#

it looks like AI upscaling fucked it up

clear sedge
#

i had a dream where my compiler told me to use uint_8_t instead of uint8_t Stare_Lizord

#

what a world that would be

tender river
#

uin8 uin16 uin32

#

sin8 sin16 sin32

rare bramble
cosmic sphinx
#

couldnt say the same about flash's upgrade

shadow sinew
#

Looks like they added a USB-C port at the last moment so someone shopped it into an existing product shot (poorly).

obsidian mantle
#

At first i thought you were talking about flash player

sage crag
#

https://youtu.be/RFWJM8JMXBs
@stray dragon @obsidian mantle video about ans

an explanation of the source coding theorem, arithmetic coding, and asymmetric numeral systems
this was my entry into #SoMEpi. this video can get pretty confusing, so don't worry if it takes some rewatches to understand. if i had more time i would've made it better....but anyway i hadn't seen many videos on this so i hope it is a helpful introdu...

▶ Play video
sick owl
cosmic sphinx
#

yeah, google finally revealing what they cooked in robotics

#

and even deployed a test model on AI studio too

clear sedge
#

writing a gltf parser is so fun

sick owl
#

I can't wait to play with this

#

Did they add a preview of the non ER version as well?

cosmic sphinx
#

unfortunately all gemini models, including this one, are still not good enough for counting tasks on image

sage crag
#

mambo mambo

rigid snow
#

ded chat neuroGiggle

sick owl
#

Its a very impressive reasoner

olive sable
#

im back home neuroHypers

clear sedge
#

i wonder how long i've had this qemu instance open for Stare_Lizord

#

"gee i wonder why i'm using so much ram"
the kde fedora instance i launched for testing days ago:

faint sandal
sage crag
#

vani put tthis emoji in the server pleas

tender river
#

neuroSMH forgot FlowerCatJAM

sage crag
clear sedge
#

how can you forget FlowerCatJAM

sage crag
#

cantjam

faint sandal
sage crag
#

:MeWhen:

tender river
faint sandal
sage crag
#

i forgot pogs

#

@tender river writeShellScriptBin

#

writeShellApplication

olive sable
real sierra
#

mimimi