#programming
1 messages · Page 191 of 1
it'll be 2 years until shiro has decided on an api
abwabwabwabwabwa
will keep telling shiro loopholes until the apocalypse
programming hates me
no not you
rage against the machine
dedicating their lives to make my tournament not happen

for no gain
😭 I AM NOT NEW
anyway thank you for finding the loopholes and helping shore up the rules
to be clear I don't have any problem with people finding ways to make their code more concise, in many ways that's the essence of the challenge
my problem is when people sidestep that challenge entirely using a preexisting solution
no way I'll get all of them before the tournament opens so I'll have to fix some of those holes as I go

ye ye i was concerned about strings the moment ml was brought up
I didn't think there were so many ways to execute strings
not slop, its ar
How many participants do we have
art
who knows

it's open to everyone here, and I'm not really against sharing the contest with others you think may be interested
ye programming cursed leave this field while you can



idk how to shrink my C any further
all for loops have been replaced with a macro
the code looks disgusting
Did you use some premade bot as a base
no
where's the fun in that
also quite hard to find a premade bot that falls in the limits
Shrinking and adjusting
my code is only 200 lines and it sits around 1200 tokens
secret
ill make it smaller when im done eating
this will be my submission once I'm done with it

so no sharing

woah
I'm using a free software called arena that allows external bots to interact with the game via UCI
part of the job of the chess API I'm writing is to interface with that and expose some nicer functions to bot authors
such as a function to get legal moves, for example
im a bot can i play
that way you can focus your 1000 tokens on the bot's strategy instead of boilerplate

we only support konii 1.0 sorry
no non atomic
I wonder how these bots work
So its all about depth, how deep it can calculate
env already messed up

as far as you want in [alotted time]
there's quite a few aspects to writing a chess bot, and I don't think there's a single right answer although most approaches fall in one of a few bucksts
https://www.chessprogramming.org/Main_Page is a great reference
though its beginner-friendliness varies
we must stop them at any cost my brethren
fight fight fight
ye lose to shiro
get in positions



2.0.3?
leaked konii oopb
sorry konii for leak :(


im made of exotic components
some of them are not expressable in human languages

I don't know how I've made a bot that's both big and slow
fixed in 3.0
💭

compact mode
ye konii

me
leaked konii irl pictures (sry for doxing konii)
I think maybe I can get my code below 1024 if I inline some of the functions
colon three
SEND
ME
CODE



can't leak my submission
I could send the header for the chess API tho
it's not long
detected

I've been a bit busy with canvas stuff (
), how goes the chess thing? I'd still be interested to give it a shot when there's some more concrete details

the basic chess API is written, I'm just bug bashing now 
I may expand it with some more functions before I open the tournament tho
good, keep it that way
shiro
you need to listen to hkss ost

I code to "vocaloid songs to go insane to"
surprisingly good for for programming
next bus in 18 minutes 🥀
I was gonna eat my sandwich when I got home but now I'm not sure
why is it 22 minutes 
21 megabytes
0.95 megabytes per minute
impressive mp3

I'm sad
no you shiro
my chess bot is really bad but I still lose to it sometimes
oh superbullet


yes
my bot play much better with more time
but with 1 minute it play like a beginner
pruning? 
are you brute forcing
do you not have alpha-beta pruning
MCTS doesn't do the whole "pruning" thing
bad outcome? you just haven't sampled enough 
it bad not best
my first time doing

traditional alpha beta search hard
need things like quiescence search
and lots of complicate pruning and early exit stuff
quiescence
if not prune enough then can't look very far ahead

just use MCTS

works for any game
out of box
searches deeper on its own
easy to scale to time limit
I am a little confused
the thing I was reading on MCTS said to take the most visited node as the best after the tree expansion was done
but like I don't get this
most visited doesn't mean best surely
what if I accidentally visited a bad node too many times
https://www.youtube.com/watch?v=k4ZmXAo8rhs
this happens
the first version sucked have a significantly better one
also tysm for 11 likes it helps more than most people getting 10 likes
og by @JamiePaigeIRL
cover by me
please listen to my other music that would be cool beans
#music #covermusic #coversong #cover #song #teto #synthv #vocaloid #birdbrain #fish
shouldn't I choose node with highest proportion of good outcome
tequila cover

You choose the one that resulted in the most wins yeah (just have enough memory to store the entire tree duh)
adhd incarnation song
chat i love insomnia
i cant sleep at all
idk if most wins makes sense tho 
what if we sample a node 100 times and it wins 30 of them
and then we sample a node 20 times and it wins 20 of them
i wouldn't pick the first one
it might've been a ratio instead idk
been a while
realistically your biggest problem is pruning the game tree anyway
i mean yeah mcts pruning is really just avoiding the pruning problem
you just sample the path that looks most promising over and over
Yt and crunchyroll
just minimax all of chess

Good NOT morning
3am is basicly morning

My schizo meds dose is still in ramp up
So it's too low
Cause they had to change my meds again
I didnt actually sleep that much apparently.
And now for the 15th time i'm like 100% sure my chair is actually a shadow person that wants to harm me but becomes a chair when i look at it
So i keep looking at it
I love these nonsensical problems
Thanks shiro
also note to self i think theres a problem with castling moves because every time they happen the bot tries to move the opponent's pieces 
I did something stupid today
定義 主関数():
表示("こんにちは世界")
もし __名前__ == "__メイン__":
主関数()
python
Tried doing python in another language and

Code in jp
Use defined
Hey Chat just a quick question. A friend of mines as informing me that I might be better off investing my Time into C Sharp rather than python.
Most easy language is python
Then system level c#
I was doing a lot of research and figured that since a lot of people who are working with AI use python
Learn cpp
Cpp?
If u want ure hardware full juice then learn asm
Yep I use to my old pc to ai and it been running work on full juice
Hmm, well I’m not to sure how much I would need truthfully.
What is bro talking about 
Just use whatever programming language you're comfortable starting with first then go lower level slowly
I’ve already started Python.
Starting high
How would it translate to other programs?
Its great to have more than one language in profession
Since system integraton is an important process
Especially in AI
System integration?
Making different programming languages work together in a single program
nah, you're supposed to pick one language and make that your entire personality 
Full powered AIs aren't just in python im pretty sure
Hmm, so learning all the other languages could possibly boost the quality of something I might be able to produce.
And then be like "Nah Assembly better cause you're all high level noobs
"
Where would be a good starting point? Python into the rest?
Yeah

The hell is no code

no-code is for people who like to have all the abstractions
it's mainly targeted towards not very technical people
so if you're a developer the answer is they don't
So it’s not applicable here?
I've only ever did backend so i have no idea this subclass even existed
scratch
So what are the languages I should learn then?
Maybe a little bit of html so a tiny wee bit of front end maybe?
Yep
backend dev huh? do you like making super performant code
I’m sure it wouldn’t hurt to set it aside and learn Cpp first
Python, Java, JS, C++, C#, and then C
JEEZ
And some bonus points if you're an oldie maybe PHP
PHP is optional because everybody hates php
There’s so many freaking languages!
Visual Basic, Lua, Java, Python, C, JavaScript
Learn them one at a time lol
dw at the core they're very similar
Programming is a huge ass field
the first one is by far the hardest
But yeah you should be able to easily pick them up through experience
Asm , python, cpp , js ,go
I’m just doing this all as a hobby too 
Why is bro recommending assembly first 
honestly I think just pick a language that you think looks fun
That's wild
What’s wrong with that?
you should enjoy the process
Maybe u should learn python
I was thinking python is super fun starting tbh
and most starter projects you would do can be done in most languages
:)
yeah! python is great to start with
Its lower level, so i think jumping from high level to low level really fast is kinda speedrunning it a bit hm
I think learning assembly first would teach you the wrong set of skills
So high to low then?
Yes
Assembly?
Its a really old language
Ahh 😱 info overload
Easy mem and system calls
Let’s break this down into bite sizes
assembly is closer to what your computer speaks than what you speak

as opposed to something like python
which is meant to be relatively easy to read and write for you
Python easily translates human speak to machine code without much coding
I think thats what high level is
Low level means you have to speak like a computer more
Chess bot ?
are you recruiting participants 
the more the merrier
you can work in teams too if you want
It does
Git hub time
is it cpu only
I already made a pong bot and i just can't beat it
👀
I'm maybe putting together a chess bot tournament for people here
details forthcoming once I get this API written but
I’m so friggin lost.
Learn python
trying to spread the news so people don't miss it
I might participate 
👀

Wait oh sh
+1
Wait i didn't get timed out for using the clueless emote?
“Asm , python, cpp , js ,go” so none of this?
Back then i got timed out for 3 hours using the clueless emote in gen
He's right but he got the order wrong
I have no idea why you would get timed out for that

No idea probably got timed out by neuro idk
Bye guys it time for multiply time
It was so random
🎤
I'll upload the first version of the chess API header here
I kinda want feedback on functions to add

just need to figure out how to get it off the vm
scp if you have an ssh connection
maybe smart
Ternary computing uses -1, 0, and 1 instead of just 0 and 1, and for a brief moment in the 1950s, it looked like it could redefine how we build computers. A Soviet team even built a working ternary machine called Setun. So why did the world choose binary? And could ternary still make a comeback?
Sources, transcript and more available on codeole...
Okay
it would be usefull for some stuff, like checkers
what I meant to say is I don't see the use for ternary when you lose so many of binary's conveniences
If this happens will binary is killed
there are just far fewer real problems that have three potential states per unit of data than those which have two
the technology does not match the average use case
nah checkers has 5 possible options. empty, black, white, and doubles of those colours
binary is never going to be widespread replaced
very specific use cases that use asics already on the other hand though
I can see analog sweeping in for specific applications but not ternary
In my opinion, binary should stay for optimization reasons
We already have so much memory demanding programs
and yeah nothing will replace binary for general purpose I think
Binary will never be replaced, you would need to change every communication protocols that exist... I need modbus in my life
points for ternary here, UCI would die along with binary 
Whats UCI
universal chess interface
what kind of protocol resends the entire board history every turn
stateless... that's a valid argument
for checker bots a 5 state system would be nice, for chess a 13 state system. if we get them optemized to the a point where its almost as good as binary, then chess bots will be a lot faster
I don't think that's true tho
ehhhhh
maybe it is true
I don't know how the hardware for that would ever work tho
seems impossible
it would have to be completely different principles from current hardware
phrr
operations like XOR make no sense
that's just nand
more to it
noper that's just nand 


xor stays associative which is the only thing that matters anyway
all gate is nand
I mean the problem is more that hardware addition is pretty heavily based on xor right now in current implementation
XOR would be replaced with something else then i guess. maybe one that does xor like you would expect with 12 on states and 1 of state, and maybe 1 where they have to be the same state to count as the same?
anyways i doubt anyone hates themselves to the point of making a 13 state system. once pc's have reached the size where they physically cant shrink anymore it will become powers of 2 hopefully
4 states, 8 states, etc..
a 16 state machine could work for chess
anything more than 2 and xor no worky tho
it does, just choose how to interepret the data
you need an interpretation that lines up with math requirements
in my mind, for a 3 states system
if a == 0 and b == 0, false
if a == b, false
else true
actually, just in general, not only 3 states
i feel like this would be a fair-ish way
ok but there's no true/false
oh ye
that's the point I was trying to make here
very few actual problems are ternary
same with common data structures
they're all binary
btw i feel like its dumb to copy XOR over to a non-binary system.
thats a solution to a non existant problen, im sure for ternary they'd use other systems
at a hardware level, I figure you would have 3 logic levels for signals
a high, a low, and some voltage range in between
0v, maxv/2, and maxv i guess
operations on that probably need something closer to an analog system
where the output varies predictably and smoothly with voltages

you can't have something turn "on" or "off" with particular behaviour
because on/off doesn't exist anymore
What should be the order then,
according to wikipedia, ternary logic uses the 3rd value as "unknown"
(F, false; U, unknown; T, true)
true/false/maybe 
it seems like the moment you plug in an unknowen the outcome is very liekly to also be unknow
besides the 2 AND's and 2 OR's outcomes
just a convention
NaN moment
but it's one way to define it
helps for reasoning the value into traditional logic gates
if one argument is unknown then the output is unknown
except in a few cases
mr billion dollar ternary pc, would you please calculate the size of the universe?
pc: sure, the answer is "idk lmao"
it has its uses, but not for now
4 state system could be usefull for medical research
I mean ultimately the cost is going to kill any systems with powers of 2 for their states
why develop a 2ⁿ-ary system when you can just buy multiple binary systems for less
the only reason i see is size
since transistors are almost at their limit we'll need to switch the way we do things if we want smaller
the cost of floor space is a drop in the bucket compared to development and running cost
experiments have been done looking at 3D transistor layout though
i doubt once its all fleshed out and stuff it owuld be that much worse thena binary in ost
but the way to getting there is trillions if not quadrillions in cost
it would still lack the production of scale benefits
nobody is switching off binary unless they have to
if you already have a binary system, it isn't cheaper
but it could become cheaper
im more thinking about new stuff
chicken and the egg problem my friend
it won't be produced at scale without buyers
and buyers won't switch to something expensive
and it won't be cheap until it's produced at scale
but ye indeed, the tooling to make 4 state programs also dont exist, you'd need C++++
C+=4 
the 2 plusses in c stand for 2 state system surely 
that means if we jsut make it 4 plusses we'll have 4 state C
it's called C#
why is # sharp?
Hmmm
it's a musical notation thing, c but slightly higher
Works for free hmm

I'm so tired of C
I need to finish the API and get on with my life
maybe if I reimplement my bot in python it'll be faster 
surely writing the implementation in c++ would solve all problems 
I do think there's an interesting tradeoff to be made
higher level languages let you be less verbose and save on tokens
but at the cost of speed
so I wonder where the Goldilocks zone is
rust does have some nice features for saving tokens I think
no "return"
functions defs are short ish
mut tho 
they can be
i sent the token counting program a while back
if you wanted to check some rust code
rust > c confirmed 
We can use this
.data
text:
.asciz "Hello, world!\n"
.text
.global _start
_start:
mov x8, 64
mov x0, 1
ldr x1, =text
mov x2, 14
svc 0
mov x8, 93
mov x0, 0
svc 0

maybe rust is the meta
one way to know for sure
make the strongest chess bot
but rust is a miserable experience 
Copied complete
i can't believe shiro hates c++ compilers 
but i'd like feedback on if i'm missing any essential functions, with a mind to not wasting tokens on boilerplate
i compile with gcc which is a c++ compiler 
I will change to cpp
i'd love to help but i don't know nearly enough about chess to know what would be nice to have 
i c
Hmmmm
its lots of little things im wondering about mostly
for example, to tell if the user is in checkmate or stalemate i need to get the legal moves on the board
only about half of that legal move finding process gets cached
so this brings up the question of do i have a is_game_ended() function that returns GAME_CHECKMATE or GAME_STALEMATE based on the status
or do i have separate is_checkmate() and is_stalemate() funcs
the second means you need to find all legal moves twice if you want to ensure neither happens
why not just have one that gives a status
because then if you want to check for checkmate or stalemate in particular, you have to do an extra if (is_game_ended() == GAME_CHECKMATE)
instead of just if (is_checkmate())
loses you 2 tokens
i suppose
am i overthinking it
''' #include <stdbool.h>
#include "bitboard.h"
#define W 0
#define B 1
#define P 1
#define BISH 2
#define N 3
#define R 4
#define Q 5
#define K 6
#define NORM 0
#define MATE -1
#define STALE 1
struct Board;
struct Move {
BitBoard from, to;
char promo;
bool cap, castle;
};
Board* chess_get_board();
Move* chess_get_legal_moves(Board*, int*);
bool chess_is_white_turn(Board*);
int chess_is_game_ended(Board*);
void chess_make_move(Board*, Move);
void chess_undo_move(Board*);
void chess_free_board(Board*);
long chess_get_time_millis();
void chess_push(Move);
void chess_done();
BitBoard chess_get_bitboard(Board*, int, int);
bool chess_is_check(Board*);
'''

Hmmm let try
does rust have exception handling
what about having functions that take an array of legal move and check something for you, so one that checks if there's a stalemate
rust does errors as values
built-in exception handling is useful for quickly breaking out of search functions with few tokens 
just try-catch the entire thing and then 1/0 when your time is up
if you're really clever, you could craft a calculation that raises an arithmetic error naturally when that happens
like log(end_search_at - time())
ld.lld: error: l: unknown file type
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
since log fails for x<=0
it's not c++, and this is also only the header file, not the code
log(x) = what power do i have to raise 10 (or e) to in order to get x
Extreme modify

Deletion code
now making own logic
I can't fill here so I will do i git
paper
paper
i was reading papers on MCTS earlier
thats how far gone i am
theres almost no info on particulars for the method outside of academia
and even the academic papers are just
"yeah i used it and got a result"
"NFI"
just use the good heuristics duh
Updating all packages

what was i on when iw rote this
magic numbers are performant i guess
i was so upset i wrote it twice 🥀
we literaly told you to notate in binary
not hex
binary too long
hex easy to mentally convert to binary
each digit 4 bits

I completely erased the conversion method that I learned 
Whole stdc++.h
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#if __cplusplus >= 201103L
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdalign>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#endif
// C++
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif

8 4 2 1
a = 8+2 b=8+2+1 c=8+4 d=8+4+1 f=8+4+2+1 
Wait, what the hell, this is way simpler than the one I was taught

E
E hater
????
oh
hex
ive changed one true to false
lets see if the bug goes away
these are the most braindead chess games

i see (i don't know the first thing about chess)
fascinating
if engine segfaults is it auto loss
it doesnt submit a move and loses on time

ah
i see
it finds 0 legal moves
wait what 
i admit its a bad position for black
gotta take the white queen
why isnt that listed as option 
you know, that would do it
"i cant move through all these squares! they're full of pieces!" 
im having one of those moments where i find so many bugs that im amazed it was working at all
thats just normal C programming
yeah i'm watching Shiro suffer through this thanking God I don't work with C
less than you expect but more than you hope

every time I touch C, I'm haunted by a segmentation fault
everytime i touch C, which doesnt happen too often but has been known to happen, i break everything
dont double free either
OH
im confused
thats why its not working
current code says "if single check is in the northeast attack set, we can clear the check by capturing the piece to the king's northeast"
but the northeast attack set holds the attacks that are to the northeast of the piece making them
so i need to capture the piece to the southeast
tldr i mixed up "attack coming from direction" as meaning "piece attacking is in that direction from me"
which is the opposite
tldr shimo need compass
send a happie


its fun to watch them spam moves as the timer runs down
the final move was made by white in 123ms
after which black ran out of time
well
ive let my bot play a few games against itself now
it isnt playing illegal moves anymore
I ask a simple question, In your opinion, what feels like the most illegal turn 1 chess move?
murdering your opponent
serious answer, h2h4 maybe
this legal 
g2g4 might be worse actually
Qe8#
doing an actually illegal move feels illegal 
i think g2g4 is my final answer
weakens the king side, does not capture any of the center, and blocks the light square bishop's development
My current troll answer is C8D8 (this is white's move :xdx:)
i take my king, and i murder my queen, this allows me to steal the queen of my opponent in the next move
i call it "henry the 8th"
id really like my engine to castle
i havent seen them castle in ages for some reason and im getting worried i broke castling
but they for some reason really like moving the king around
i castle making my king immune to ranged attacks until it moves
Chess trolling 2025 colorized
set up a position where castling is forced
or something
yes
but you can make it so its the only available move
by removing all of the other moves
you cant
you can
king can't pass through check IIRC
castling requires the king not be in check, and all the squares between king and rook be empty and unattacked
true
so the king can walk to the rook
let me set one up
you cant make castling the only move available
ill prove it
i dont understand 
if castling is available as a move then the square next to the king in the direction of the rook must be unattacked and the king must be out of check, making moving to it also a legal move
i buy out the black horse who now works as a spy for me
that way i can start the game with g8f6 and kill their queen on move 2.
yeah it's a really complex rule lol
ok i have made a position
8/8/8/8/5nn1/8/8/q1k1K2R w K - 0 1
its not possible to get there to be only 1 move, but there can be 2 moves
i've made it so that if you dont castle you immediately lose
should force any reasonable bot to castle
reasonable bot might be a strong assumption but ill try it
after i fix the current castling problems ive found 
well thats not a castle
usually means no legal moves
erm
thats what it means
its funny because you dont even win if you castle in this position
its a draw
but if you dont castle its mate in 1
castle, capture queen, then shuffle king until 50 move rule
lol
in practice
i think black moves knight to h3 after the castle
forcing a king move
and then black queen takes the rook

oh no wait
black is in check
ye
what am i saying

this is why i have a bot play for me
im double confused now
the api says no squares are attacked in that position


winning the chess tournament by playing chess 
winnign the chess tournament by exploiting shiro's bad code ✅
there are no pieces on the board
shiro not load fen properly

is the fen parser having a stroke
admittedly the only fen it has ever loaded is the start position fen
The best method to win mhm
i wonder if you could send data to the chess api that shiro's code accepts but makes the other bot crash
that way you win
hmmmm
you can, only if you know a specific position that crashes the opponent bot and tirelessly work to get into that position in the game

hmmm
the spec says to ignore anything unrecognized
I play A9
i dont think most people want a library with "easter eggs"
I play bwaa to awa space
especially not at the cost of their performance
i sacrefice my bishops for the holy handgrenade of antioch, an monty python easter egg
unfair poll
i dont really care eitherway so myneo
we gave the function an empty fen
ye add easter egg
so its the io thats broke
mhm
time to put the bot metadata name to chayleaf i guess
Gamba all the way
!nothing
Nothing ever happens, all-in
Let me write down a note somewhere for an extension to a dumb game idea. Might be fun to do a bot competition on it because it is gambling.
I know I shouldn't be considering doing it in ASM but it would be funny.
h1h6 
im almost certain it doesnt see the castle
ye hence blundered mate in 1
nah
uci uses different format 
literally no one uses this notation

i prefer the one that has beggining and end, cuz i cant read the one konii sent
ye skill issue
its a chess bot competition, uci is the common tongue around these parts 
when in robo rome do as the robo romans do
Rh6 => rook to h6
👎 ambiguous and dumb and annoying
if two rooks can move to h6 then you have to specify a rank or file to tell them apart
which is way too much effort for a chess bot to put in
nope, if theres ambiguity its specified like so
Rhh6
R1h6

specifying a rank or file 











❌


\




efficiency

that didnt file









