#programming

1 messages · Page 191 of 1

sage crag
#

lord

opaque sigil
#

it'll be 2 years until shiro has decided on an api

obsidian mantle
#

oh right

#

the backend

sage crag
#

phrrrrrrr

#

tournament never happening

stark needle
#

abwabwabwabwabwaniuh

sage crag
#

will keep telling shiro loopholes until the apocalypse

real sierra
#

Sadgi programming hates me

sage crag
#

rage against the machine

real sierra
#

dedicating their lives to make my tournament not happen

sage crag
real sierra
#

for no gain

tender river
#

yuri slop:

real sierra
#

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

tender river
sage crag
real sierra
#

I didn't think there were so many ways to execute strings

sage crag
obsidian mantle
#

How many participants do we have

sage crag
real sierra
sage crag
real sierra
#

it's open to everyone here, and I'm not really against sharing the contest with others you think may be interested

sage crag
real sierra
tender river
real sierra
#

idk how to shrink my C any further

#

all for loops have been replaced with a macro

#

the code looks disgusting

obsidian mantle
#

Did you use some premade bot as a base

real sierra
#

no

#

where's the fun in that

#

also quite hard to find a premade bot that falls in the limits

obsidian mantle
#

Shrinking and adjusting

real sierra
#

my code is only 200 lines and it sits around 1200 tokens

sage crag
real sierra
sage crag
#

ill make it smaller when im done eating

real sierra
#

this will be my submission once I'm done with it

sage crag
real sierra
#

so no sharing

sage crag
#

who keeps adding these cats MyHonestReaction

#

thank you cat adder

real sierra
sage crag
#

woah

obsidian mantle
#

How do you test the bot?
How does it move pieces

#

And where

sage crag
#

vani when will you fix tldr

tender river
#

/tldr

real sierra
#

I'm using a free software called arena that allows external bots to interact with the game via UCI

sage crag
#

!tldr

real sierra
#

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

sage crag
#

im a bot can i play

real sierra
#

that way you can focus your 1000 tokens on the bot's strategy instead of boilerplate

sage crag
real sierra
sage crag
#

but i just updated

tender river
#

ye downgrade

sage crag
obsidian mantle
#

I wonder how these bots work
So its all about depth, how deep it can calculate

sage crag
#

env already messed up

tender river
sage crag
real sierra
sage crag
#

hey lilac why did you delete that

real sierra
#

though its beginner-friendliness varies

sage crag
#

go my army

real sierra
#

neuroChipiChapa neuroChipiChapa neuroChipiChapa we must stop them at any cost my brethren

tender river
#

neuroCatModeOn fight fight fight

real sierra
#

my bot is so bad right now

#

I give it maybe 200 elo

tender river
#

ye lose to shiro

sage crag
#

get in positions
evilHarpoon
evilHarpoon evilHarpoon evilHarpoon evilHarpoon

real sierra
sage crag
#

fire

stark needle
sage crag
real sierra
stark needle
sage crag
#

ye that upstream model

#

not public yet

stark needle
#

sorry konii for leak :(

sage crag
#

you on thin ice schizolilac

tender river
sage crag
tender river
sage crag
#

some of them are not expressable in human languages

real sierra
#

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

sage crag
#

dumbot

#

big and slow bot need to go to college

tender river
stark needle
#

my honest reaction

sage crag
#

check again

#

lock out lilac

tender river
#

bwaadow 💭UNFOCUS

sage crag
tender river
#

MyHonestReaction compact mode

sage crag
tender river
sage crag
#

focile

#

unfocile

#

smocus

#

unsmocus

#

focus

#

unfocus

#

smile

#

neuroBritish

tender river
#

ye konii

sage crag
tender river
sage crag
#

me

stark needle
#

leaked konii irl pictures (sry for doxing konii)

real sierra
#

doxxing

#

ban

real sierra
#

I think maybe I can get my code below 1024 if I inline some of the functions

sage crag
#

colon three

real sierra
sage crag
real sierra
#

can't leak my submission

sage crag
#

that's it

#

im reading the code from your mind

real sierra
#

I could send the header for the chess API tho

sage crag
#

reading

real sierra
#

it's not long

sage crag
#

nwerobreadjam detected

real sierra
#

breadjam

#

that is where jam goes

sage crag
real sierra
#

flower cat

sage crag
rigid timber
#

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

sage crag
#

chess isnt real

#

you made it up

#

in your pixels

rigid timber
real sierra
#

I may expand it with some more functions before I open the tournament tho

sage crag
#

i have not placed my pickle

#

IPlacedMyPickle

rigid timber
#

good, keep it that way

sage crag
#

you need to listen to hkss ost

real sierra
real sierra
#

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

sage crag
real sierra
#

madoka magika

#

🔥

sage crag
#

why is it 22 minutes susge

#

21 megabytes

#

0.95 megabytes per minute

#

impressive mp3

real sierra
#

I'm sad

sage crag
real sierra
#

my chess bot is really bad but I still lose to it sometimes

sage crag
#

let me play against it

real sierra
#

it's because of the 1 minute timer for each side

#

1 minute is so short

sage crag
#

oh superbullet

real sierra
sage crag
real sierra
#

yes

#

my bot play much better with more time

#

but with 1 minute it play like a beginner

sage crag
#

do better pruning

#

delta pruning or something

real sierra
#

pruning? glueless

sage crag
#

do you not have alpha-beta pruning

real sierra
#

MCTS doesn't do the whole "pruning" thing

sage crag
#

oh its because you did

#

yeah

#

mtcts

#

i mean

#

mcts

real sierra
#

bad outcome? you just haven't sampled enough OfCourse

sage crag
#

mcts sound bad

#

do better

real sierra
#

MCTS is not bad

#

I probably just did it badly

sage crag
#

it bad not best

real sierra
#

my first time doing

sage crag
real sierra
#

traditional alpha beta search hard

#

need things like quiescence search

#

and lots of complicate pruning and early exit stuff

sage crag
#

quiescence

real sierra
#

if not prune enough then can't look very far ahead

sage crag
#

prune better

real sierra
#

no tokens

sage crag
#

prune better

#

include prune token better

real sierra
#

just use MCTS

#

works for any game

#

out of box

#

searches deeper on its own

#

easy to scale to time limit

sage crag
#

clearly bad

#

1 minute

real sierra
#

1 minute is smol time limit

sage crag
#

nop

#

you can do

real sierra
#

I am a little confused

real sierra
#

the thing I was reading on MCTS said to take the most visited node as the best after the tree expansion was done

sage crag
#

sherm doesnt have four-fold symmetry

#

so it doesnt tile the surface of a cube

real sierra
#

sherm tiles a rectangle

real sierra
#

most visited doesn't mean best surely

sage crag
#

sherm will never tile

real sierra
#

what if I accidentally visited a bad node too many times

sage crag
real sierra
#

shouldn't I choose node with highest proportion of good outcome

sage crag
#

it says cover

#

but i dont hear words

real sierra
#

tequila cover

sage crag
#







tequila


uneven pulsar
opaque sigil
stark needle
#

chat i love insomnia

#

i cant sleep at all

real sierra
#

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

opaque sigil
#

it might've been a ratio instead idk

#

been a while

#

realistically your biggest problem is pruning the game tree anyway

real sierra
#

i mean yeah mcts pruning is really just avoiding the pruning problem

#

you just sample the path that looks most promising over and over

olive sable
#

havent watche that one yet

#

i wish i got anime ads on my yt

hollow spruce
#

Yt and crunchyroll

sage crag
olive sable
#

oh

#

goodmorning neuroWaveA \

#

i almost forgor

#

anyways new kaiju no 8 episode, brb

stark needle
olive sable
#

3am is basicly morning

stark needle
#

Man I'm trying to sleep but

#

I'm doing really unwell

olive sable
stark needle
#

My schizo meds dose is still in ramp up

#

So it's too low

#

Cause they had to change my meds again

olive sable
stark needle
#

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

real sierra
#

take care friend

#

please be safe

stark needle
real sierra
#

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 Om

blissful geyser
#

I did something stupid today

#
定義 主関数():
    表示("こんにちは世界")

もし __名前__ == "__メイン__":
    主関数()
real sierra
#

python

blissful geyser
#

Tried doing python in another language and

real sierra
blissful geyser
#

Hey it works glueless

wet jewel
#

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.

hollow spruce
#

Then system level c#

wet jewel
#

I was doing a lot of research and figured that since a lot of people who are working with AI use python

wet jewel
#

Cpp?

hollow spruce
wet jewel
#

My hardware full juice? Wdym?

#

Like the true potential of my pc?

hollow spruce
#

Yep I use to my old pc to ai and it been running work on full juice

wet jewel
#

Hmm, well I’m not to sure how much I would need truthfully.

blissful geyser
#

What is bro talking about glueless

#

Just use whatever programming language you're comfortable starting with first then go lower level slowly

wet jewel
#

I’ve already started Python.

wet jewel
#

How would it translate to other programs?

blissful geyser
#

Its great to have more than one language in profession

#

Since system integraton is an important process

#

Especially in AI

wet jewel
#

System integration?

blissful geyser
opaque sigil
#

nah, you're supposed to pick one language and make that your entire personality neuroPogHD

blissful geyser
#

Full powered AIs aren't just in python im pretty sure

wet jewel
#

Hmm, so learning all the other languages could possibly boost the quality of something I might be able to produce.

hollow spruce
blissful geyser
wet jewel
#

Where would be a good starting point? Python into the rest?

hollow spruce
opaque sigil
blissful geyser
#

The hell is no code

wet jewel
opaque sigil
#

no-code is for people who like to have all the abstractions

blissful geyser
#

How do they fit in the program development circle lol

#

Are they like QnA testers

opaque sigil
#

it's mainly targeted towards not very technical people

#

so if you're a developer the answer is they don't

wet jewel
#

So it’s not applicable here?

blissful geyser
#

I've only ever did backend so i have no idea this subclass even existed

real sierra
wet jewel
#

So what are the languages I should learn then?

blissful geyser
#

Maybe a little bit of html so a tiny wee bit of front end maybe?

wet jewel
#

CPP was one suggestion

#

I’ve already started python but..

hollow spruce
real sierra
wet jewel
#

I’m sure it wouldn’t hurt to set it aside and learn Cpp first

blissful geyser
wet jewel
#

JEEZ

blissful geyser
#

And some bonus points if you're an oldie maybe PHP

real sierra
#

java BASED

#

god what order did I learn languages in

blissful geyser
#

PHP is optional because everybody hates php

wet jewel
#

There’s so many freaking languages!

real sierra
#

Visual Basic, Lua, Java, Python, C, JavaScript

blissful geyser
opaque sigil
#

dw at the core they're very similar

blissful geyser
#

Programming is a huge ass field

opaque sigil
#

the first one is by far the hardest

blissful geyser
#

But yeah you should be able to easily pick them up through experience

hollow spruce
wet jewel
#

I’m just doing this all as a hobby too aquacry

blissful geyser
real sierra
#

honestly I think just pick a language that you think looks fun

blissful geyser
#

That's wild

wet jewel
#

What’s wrong with that?

real sierra
#

you should enjoy the process

hollow spruce
#

Maybe u should learn python

wet jewel
#

I was thinking python is super fun starting tbh

real sierra
#

and most starter projects you would do can be done in most languages

#

:)

#

yeah! python is great to start with

blissful geyser
real sierra
#

I think learning assembly first would teach you the wrong set of skills

wet jewel
#

So high to low then?

blissful geyser
wet jewel
#

Assembly?

blissful geyser
wet jewel
#

Ahh 😱 info overload

hollow spruce
#

Easy mem and system calls

wet jewel
#

Let’s break this down into bite sizes

real sierra
#

assembly is closer to what your computer speaks than what you speak

opaque sigil
real sierra
#

as opposed to something like python

#

which is meant to be relatively easy to read and write for you

blissful geyser
#

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

hollow spruce
#

Nai

#

Binary is actual

real sierra
#

but roshie I have to ask

#

does writing a chess bot sound fun to you

hollow spruce
opaque sigil
#

are you recruiting participants neuroPogHD

real sierra
#

you can work in teams too if you want

blissful geyser
hollow spruce
opaque sigil
#

is it cpu only

blissful geyser
#

I already made a pong bot and i just can't beat it

wet jewel
#

👀

real sierra
#

details forthcoming once I get this API written but

wet jewel
#

I’m so friggin lost.

hollow spruce
real sierra
#

trying to spread the news so people don't miss it

blissful geyser
wet jewel
#

👀

real sierra
blissful geyser
#

Wait oh sh

real sierra
#

+1

blissful geyser
#

Wait i didn't get timed out for using the clueless emote?

real sierra
#

?

#

timed out?

wet jewel
#

“Asm , python, cpp , js ,go” so none of this?

blissful geyser
blissful geyser
tender river
real sierra
real sierra
blissful geyser
hollow spruce
#

Bye guys it time for multiply time

blissful geyser
#

It was so random

tender river
real sierra
#

I'll upload the first version of the chess API header here

#

I kinda want feedback on functions to add

opaque sigil
real sierra
#

just need to figure out how to get it off the vm

opaque sigil
#

scp if you have an ssh connection

real sierra
#

maybe smart

hollow spruce
#

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...

▶ Play video
real sierra
#

I am not using a ternary system

#

it is not useful

hollow spruce
#

Okay

real sierra
#

maybe that was closed-minded of me to say

#

I apologise

olive sable
#

it would be usefull for some stuff, like checkers

real sierra
#

what I meant to say is I don't see the use for ternary when you lose so many of binary's conveniences

hollow spruce
#

If this happens will binary is killed

real sierra
#

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

olive sable
opaque sigil
#

binary is never going to be widespread replaced

#

very specific use cases that use asics already on the other hand though

real sierra
#

I can see analog sweeping in for specific applications but not ternary

blissful geyser
#

In my opinion, binary should stay for optimization reasons

#

We already have so much memory demanding programs

real sierra
#

and yeah nothing will replace binary for general purpose I think

brave owl
#

Binary will never be replaced, you would need to change every communication protocols that exist... I need modbus in my life

real sierra
blissful geyser
#

Whats UCI

real sierra
#

universal chess interface

blissful geyser
#

Oh

#

Yeah that makes sense

real sierra
#

what kind of protocol resends the entire board history every turn

blissful geyser
#

Stateless i guess

#

That kind of protocol would be weird

real sierra
#

stateless... that's a valid argument

olive sable
#

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

real sierra
#

I don't think that's true tho

olive sable
#

wdym?

#

then you'd only need a single 64 "13 state bit???" bitboard

real sierra
#

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

sage crag
#

phrr

real sierra
#

operations like XOR make no sense

sage crag
#

you XOR you = 0

#

always true

#

you XOR other != 0

#

always true

real sierra
#

that's just nand

sage crag
#

more to it

real sierra
#

noper that's just nand nuhuh

sage crag
#

ye xor is nand

real sierra
sage crag
tender river
opaque sigil
#

xor stays associative which is the only thing that matters anyway

sage crag
#

all gate is nand

real sierra
#

I mean the problem is more that hardware addition is pretty heavily based on xor right now in current implementation

sage crag
real sierra
#

no xor = no addition

#

bye efficiency

olive sable
#

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

real sierra
#

anything more than 2 and xor no worky tho

olive sable
#

it does, just choose how to interepret the data

real sierra
#

you need an interpretation that lines up with math requirements

olive sable
#

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

opaque sigil
#

ok but there's no true/false

real sierra
#

the first condition is part of the second

#

and then you just have NAND

olive sable
real sierra
#

that's also true yeah

#

there's no true/false

olive sable
#

the output also has to be a 3 state system then

#

weird

real sierra
#

very few actual problems are ternary

#

same with common data structures

#

they're all binary

olive sable
#

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

real sierra
#

ok sure

#

fair point

#

you still do need addition tho

#

that's non-optional

olive sable
#

ye

#

im not smart enough to figure that out tho

real sierra
#

at a hardware level, I figure you would have 3 logic levels for signals

#

a high, a low, and some voltage range in between

olive sable
#

0v, maxv/2, and maxv i guess

real sierra
#

operations on that probably need something closer to an analog system

#

where the output varies predictably and smoothly with voltages

olive sable
real sierra
#

you can't have something turn "on" or "off" with particular behaviour

#

because on/off doesn't exist anymore

olive sable
#

i would assume ternary OR would add the values and clamps to vmax?

#

huh

wet jewel
olive sable
#

according to wikipedia, ternary logic uses the 3rd value as "unknown"

#

(F, false; U, unknown; T, true)

opaque sigil
#

true/false/maybe mhm

olive sable
#

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

real sierra
opaque sigil
#

NaN moment

real sierra
#

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

olive sable
#

mr billion dollar ternary pc, would you please calculate the size of the universe?
pc: sure, the answer is "idk lmao"

real sierra
#

yeah it just doesn't seem like the future to me

#

the water integrator tho

#

👀

olive sable
#

it has its uses, but not for now

#

4 state system could be usefull for medical research

opaque sigil
#

just look at "1 bit" ml models

#

it sort of works

#

though that's not for logic

real sierra
#

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

olive sable
#

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

real sierra
#

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

olive sable
#

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

real sierra
#

nobody is switching off binary unless they have to

olive sable
#

unless its cheaper

#

which it wont be

real sierra
#

if you already have a binary system, it isn't cheaper

olive sable
#

but it could become cheaper

real sierra
#

doing nothing is cheapest

#

$0

#

staying with your existing system

olive sable
#

im more thinking about new stuff

real sierra
#

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

olive sable
#

but ye indeed, the tooling to make 4 state programs also dont exist, you'd need C++++

real sierra
#

C+=4 catdespair

olive sable
#

the 2 plusses in c stand for 2 state system surely NeuroClueless

#

that means if we jsut make it 4 plusses we'll have 4 state C

opaque sigil
#

it's called C#

olive sable
#

why is # sharp?

hollow spruce
#

Hmmm

opaque sigil
#

it's a musical notation thing, c but slightly higher

hollow spruce
#

Works for free hmm

real sierra
#

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 glueless

opaque sigil
#

surely writing the implementation in c++ would solve all problems glueless

real sierra
#

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

opaque sigil
#

[insert rust remark here]

#

though i guess

#

rust is very verbose

real sierra
#

rust does have some nice features for saving tokens I think

#

no "return"

#

functions defs are short ish

#

mut tho Aware

opaque sigil
#

they can be

real sierra
#

i sent the token counting program a while back

#

if you wanted to check some rust code

opaque sigil
#

rust > c confirmed mhm

hollow spruce
#

.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
real sierra
#

maybe rust is the meta

#

one way to know for sure

#

make the strongest chess bot

opaque sigil
#

but rust is a miserable experience neuroSadge

real sierra
#

HOLY that didnt file

#

lemme try again

hollow spruce
#

Copied complete

real sierra
#

all subject to change

opaque sigil
#

i can't believe shiro hates c++ compilers neuroSadge

real sierra
#

but i'd like feedback on if i'm missing any essential functions, with a mind to not wasting tokens on boilerplate

real sierra
hollow spruce
real sierra
#

holy the api

#

66kb C monster

opaque sigil
#

i'd love to help but i don't know nearly enough about chess to know what would be nice to have neuroPogHD

real sierra
#

i c

hollow spruce
real sierra
#

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

opaque sigil
#

why not just have one that gives a status

real sierra
#

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

opaque sigil
#

i suppose

real sierra
#

am i overthinking it

hollow spruce
#

''' #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*);

'''

opaque sigil
real sierra
#

``` not '''

#

also make sure the first ``` are on their own line

hollow spruce
real sierra
opaque sigil
#

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

real sierra
#

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())

hollow spruce
#

ld.lld: error: l: unknown file type
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

real sierra
#

since log fails for x<=0

opaque sigil
#

does it?

#

it's technically valid

real sierra
real sierra
hollow spruce
#

Extreme modify

real sierra
#

you can never get a negative number by raising a positive value to a power

#

or zero

opaque sigil
#

you can

#

with complex numbers

real sierra
#

programming channel technically correct addiction has gone too far

opaque sigil
real sierra
#

everyone here TheVoices

#

literally everyone TheVoices

#

even me TheVoices

hollow spruce
#

Deletion code
now making own logic

tender river
#

paper hell neuroSCHIZOneuroSCHIZOneuroSCHIZO

#

maybe i only exist on paper

hollow spruce
#

I can't fill here so I will do i git

tender river
#

neuroBlabbering paper

real sierra
#

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"

opaque sigil
#

just use the good heuristics duh

hollow spruce
#

Updating all packages

real sierra
#

what was i on when iw rote this

#

magic numbers are performant i guess

#

i was so upset i wrote it twice 🥀

olive sable
tender river
tender river
#

hex easy to mentally convert to binary

#

each digit 4 bits

hollow spruce
#

Well I forgot
stdc++.h

#

Logic has error

pearl lake
hollow spruce
#

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

opaque sigil
tender river
#

8 4 2 1
a = 8+2 b=8+2+1 c=8+4 d=8+4+1 f=8+4+2+1 evilNodders

opaque sigil
#

That one is outdated af btw

#

c++11

hollow spruce
#

That why

#

I can't find any stdc++.h

tender river
#

gcc/clang colonthree

#include <bits/stdc++.h>
#

msvc bad dont use evilSMH

pearl lake
tender river
opaque sigil
#

E

tender river
#

not real studyVIBE

pearl lake
#

E hater

real sierra
#

oh

#

hex

#

ive changed one true to false

#

lets see if the bug goes away

#

these are the most braindead chess games

pearl lake
real sierra
#

it's better than random moves

#

but only barely

pearl lake
olive sable
real sierra
#

fascinating

sage crag
#

shimo

#

ermo

real sierra
#

i found a position in which my engine simply segfaults instead of playing

real sierra
#

very reliably too

#

which is impressive given it's random

#

hello valgrind

sage crag
#

if engine segfaults is it auto loss

real sierra
#

it doesnt submit a move and loses on time

#

ah

#

i see

#

it finds 0 legal moves

#

wait what Huh

#

i admit its a bad position for black

#

gotta take the white queen

#

why isnt that listed as option Hmm

#

you know, that would do it

#

"i cant move through all these squares! they're full of pieces!" glueless

#

im having one of those moments where i find so many bugs that im amazed it was working at all

olive sable
#

thats just normal C programming

sage crag
#

are you sure

pearl lake
sage crag
#

my experience working with c is i make as many bugs as with other languages

olive sable
#

i dont know how many those are

#

but i sure make a lot of bugs

sage crag
pearl lake
sage crag
#

dont rw memory out of bounds then

olive sable
#

everytime i touch C, which doesnt happen too often but has been known to happen, i break everything

sage crag
#

dont double free either

real sierra
#

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

pearl lake
#

i'm too eepy to understand this

real sierra
#

tldr i mixed up "attack coming from direction" as meaning "piece attacking is in that direction from me"

#

which is the opposite

sage crag
#

tldr shimo need compass

real sierra
#

pogs it fixed it

#

im cracked EZ

sage crag
real sierra
#

lets see how well my bot plays now

#

handicap removed EZ

sage crag
real sierra
sage crag
#

ye dont have

pearl lake
real sierra
#

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

tender river
#

swarm sync app out

real sierra
#

ive let my bot play a few games against itself now

tender river
#

com.vedal.ai.swarmsync

#

for lava lamp

real sierra
#

it isnt playing illegal moves anymore

amber fractal
#

I ask a simple question, In your opinion, what feels like the most illegal turn 1 chess move?

tender river
#

murdering your opponent

real sierra
#

serious answer, h2h4 maybe

tender river
#

this legal susge

real sierra
#

g2g4 might be worse actually

real sierra
olive sable
#

doing an actually illegal move feels illegal Minamhm

real sierra
#

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

olive sable
#

development AINTNOWAY

#

shiro chess nerd

amber fractal
#

My current troll answer is C8D8 (this is white's move :xdx:)

tender river
#

no

olive sable
#

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"

real sierra
#

i take the queen i've been hiding up my sleeve and place it on the board

olive sable
#

thats somewhat true

#

you need good supply chains and stuff

real sierra
#

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

olive sable
#

enub i castle making my king immune to ranged attacks until it moves

amber fractal
sage crag
#

or something

real sierra
#

you cant

#

castling is illegal if the king is in check

sage crag
#

yes

#

but you can make it so its the only available move

#

by removing all of the other moves

real sierra
#

you cant

sage crag
#

you can

amber fractal
#

king can't pass through check IIRC

real sierra
#

castling requires the king not be in check, and all the squares between king and rook be empty and unattacked

sage crag
real sierra
#

so the king can walk to the rook

sage crag
#

let me set one up

real sierra
#

you cant make castling the only move available

sage crag
#

ill prove it

real sierra
#

i dont understand TheVoices

#

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

stray dragon
olive sable
real sierra
#

i need to modify my code Aware

stray dragon
real sierra
#

please be an easy change

#

oh i just have to change some masks

#

saved

sage crag
#

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

real sierra
#

reasonable bot might be a strong assumption but ill try it

#

after i fix the current castling problems ive found xdx

#

well thats not a castle

#

usually means no legal moves

sage crag
#

erm

real sierra
#

YES thats what it means

olive sable
sage crag
#

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

real sierra
#

wait

#

what is white supposed to do here

#

oh i see

#

ok why isnt it castling

sage crag
#

lol

real sierra
#

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

sage crag
#

ye

real sierra
#

Dentge what am i saying

sage crag
real sierra
#

this is why i have a bot play for me

#

im double confused now

#

the api says no squares are attacked in that position

sage crag
real sierra
#

which is not only wrong but also shouldnt be preventing castling

olive sable
#

code bad

#

go fix

sage crag
real sierra
#

fixing code agane

olive sable
#

winning the chess tournament by playing chess MHSC_Cross
winnign the chess tournament by exploiting shiro's bad code ✅

real sierra
#

OfCourse there are no pieces on the board

sage crag
real sierra
#

is the fen parser having a stroke

#

admittedly the only fen it has ever loaded is the start position fen

real sierra
#

i never tested on anything else

olive sable
#

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

real sierra
#

you cnat

#

it's a plaintext protocol

#

and strings are now banned

olive sable
#

hmmmm

sage crag
#

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

real sierra
#

i mean even then

#

UCI doesnt let you send that many things to the gui

olive sable
#

hmmm

real sierra
#

the spec says to ignore anything unrecognized

olive sable
#

ok i will have to play fair

#

probably

amber fractal
#

I play A9

olive sable
#

lemme just give the opponents' next move too, its more efficient this way

sage crag
#

an easter egg

real sierra
#

i dont think most people want a library with "easter eggs"

amber fractal
real sierra
#

especially not at the cost of their performance

sage crag
olive sable
#

i sacrefice my bishops for the holy handgrenade of antioch, an monty python easter egg

real sierra
#

unfair poll

sage crag
#

poll

olive sable
#

i dont really care eitherway so myneo

real sierra
#

OfCourse we gave the function an empty fen

tender river
#

ye add easter egg

real sierra
#

so its the io thats broke

tender river
#

if (bot.author == chayleaf) crash(bot.opponent)

amber fractal
#

mhm

real sierra
#

if (bot.author == chayleaf && rand() % 100 == 0) crash(bot.self)

olive sable
#

time to put the bot metadata name to chayleaf i guess

tender river
#

na thats expected behavior

amber fractal
olive sable
#

!nothing

stiff micaBOT
amber fractal
#

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.

real sierra
#

OK fixed the part of the uci server that reads the fen

#

it now plays move h1h6

sage crag
#

shimo

real sierra
#

im almost certain it doesnt see the castle

sage crag
#

the notation is Rh6

sage crag
olive sable
#

nah

real sierra
sage crag
olive sable
#

i prefer the one that has beggining and end, cuz i cant read the one konii sent

real sierra
#

its a chess bot competition, uci is the common tongue around these parts SMH

#

when in robo rome do as the robo romans do

sage crag
#

Rh6 => rook to h6

real sierra
#

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

sage crag
real sierra
#

specifying a rank or file OfCourse

sage crag
#

yes if theres ambiguity (nearly never)

real sierra
#

but you cant not check for it

#

so you always have to check for it

#

which means getting all legal moves