Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Schweinhund

:derp:   :kayak:                                     
edit: :siren: https://byobchess.neocities.org/ :siren:



I am making a browser based chess bot for fun and thought what better way to make it fun and unique than to make it BYOB themed? I just need help with a couple things if anyone is interested in helping.

1) Opponents: Players will be able to choose from a bunch of different AI opponents to play against. I need people to create characters for the AIs. I'll need the following for each character:
-Name
-200x200 pixel drawn image of a character. I'm thinking from the shoulders up + transparent background might be best, but that's not required. Gifs will work.
-Skill level. Something like "newbie" "difficult" or you can have something silly. It should be somewhat short.
-Chat messages that the character will say. There can be multiple messages for each of these.
a) Welcome message: e.g. "Hi", "Good luck"
b) when they take your piece:
c) when they lose a piece:
d) when they win:
e) when they lose:
f) when they tie:
-Then describe what their playing style should be and I will try to implement it.

2)Chess piece sets All the chess pieces drawn: King, Queen, Bishop, Knight, Rook + Pawn. One for black and one for white, so 12 altogether. Each piece should be a 200x200 image with a transparent background. There should be space around the piece so it fits inside the square. Then I need a name for the set. They should probably be recognizable as chess pieces or they might be hard to use. It would be great if there were multiple sets to choose from.

There can also be custom board & site themes, but that can come later.

The game is pretty much ready except adding the new characters and hopefully new chess pieces. Here's a sneak peak screenshot:
https://i.imgur.com/kmVyfWZ.png

Schweinhund fucked around with this message at 19:32 on Aug 2, 2022

Adbot
ADBOT LOVES YOU

Chewbecca

Just chillin' : )
I am out but I will draw a character later! :firstpost:



Thanks to Heather Papps for sweet sig, click for more hot lady action


sigs by luvcow and Khanstant.
Click on Spoonville for a neat surprise



(┛◉Д◉)┛彡┻━┻ #YesNutNovember - add this to your sig if you love and support BYOB's own nut

biosterous




it's midnight so iim not gonna effort right now but here is a thing i made a while ago, feel free to steal or ignore it



thank you saoshyant for this sig!!!
gallery of sigs


he/him

Macnult

bumping this because chess is really cool and i think this is a good idea. hoping to have the time to draw up opponents in the next few days

watho


The real world will, again tomorrow, function and run without me.

i mean you’d have to have jony in there



https://thumbs.gfycat.com/BigClutteredJoey-mobile.mp4
thank u vanisher for the sig
and thank u nesamdoom for the good loops

barnold


what do u do when yuo're born to play fps? guess there's nothing left to do but play fps. boom headshot
excited for this. will contribute when I get home tomorrow

Goons Are Gifts

holy poo poo this is amazing im so excited, remember we had a chess club in byob a while ago and this is its natural conclusion


biosterous






- name: quincy
- Skill level: nerd
a) Welcome message: i calculate that you will lose!
b) when they take your piece: my superior tactics will lead to your defeat!
c) when they lose a piece: how? you're nothing more than a blundering buffoon!
d) when they win: looks like you're not in my class! try an easier opponent!
e) when they lose: i calculated every variable and yet you beat me! how is this possible?!
f) when they tie: my calculations suggested a tie was impossible! how could this be?
- playing style: CCCP (checkmate, check, capture, push) from this video
https://www.youtube.com/watch?v=DpXy041BIlA



thank you saoshyant for this sig!!!
gallery of sigs


he/him

Schweinhund

:derp:   :kayak:                                     
Excellent. The CCCP thing is very doable.

Dr. Honked

eat it you slaaaaaaag


name: A World Without Onions
skill level: easy
a) welcome message: Imagine.. a world without onions!
b) when they take your piece: Imagine that was an onion... and now it is gone...
c) when they lose a piece: You took my piece.. but you can never take my onions, for I have none!
d) when they win: Your judgement was clouded by your inability to imagine a world without onions. Imagine harder, then try again!
e) when they lose: Good.. good! Let the power of no onions flow through you!
f) when they tie: You are one step closer to enlightenment. Cast all onions from your mind, and you may yet defeat me.
playing style: their lack of onions is a handicap. they are unable to see more than a couple of moves ahead, because the concept of "layers" is alien to them

Dr. Honked fucked around with this message at 19:31 on Jul 31, 2022



thanks deep dish pete moss and Plant MONSTER

Manifisto


opponent proposal



name: dippy
skill level: difficult (alternatively, skill level is "dippy")
welcome message: hey man, I'm dippy!
when they take your piece: one more for dippy!
when they lose a piece: hey dude that's not cool!
when they win: Dippy Wins . . . IT HAS BEGUN
when they lose: aw dangit
when they tie: some days you're the dippy, some days you're the dipee I guess
playing style: whatever style you think a smooth stone with "Dippy" inscribed on it would adopt, probably they're usually on the slower/more conservative side but with an occasional hint of wildness/chaos


ty nesamdoom!

barnold


what do u do when yuo're born to play fps? guess there's nothing left to do but play fps. boom headshot


-name: Speedy Marie
-skill level: novice (think 400-500 rated)

welcome message: I'm always happy to squeeze a game of chess into my busy day!
when they take your piece: Got 'em! Soon you'll be down to just your king.
when they lose a piece: Oh dear, I'll have to be quick on my toes from here on out.
when they win: Another victory for the books. Gotta jet for my next meeting, thanks for the game!
when they lose: Congratulations on the win! Hmmm, perhaps I should slow down and ponder my moves a little more next time...
when they draw: Right, let's call it a draw! I can pencil you in between my 3 o'clock and 4 o'clock on Monday of next week for a rematch...

playing style: artificially limited move depth calculation time - Speedy Marie must make their move faster than human player, especially if playing with time controls

barnold fucked around with this message at 20:23 on Jul 31, 2022


Ass-penny

Dr. Honked posted:



name: A World Without Onions
skill level: easy
a) welcome message: Imagine.. a world without onions!
b) when they take your piece: Imagine that was an onion... and now it is gone...
c) when they lose a piece: You took my piece.. but you can never take my onions, for I have none!
d) when they win: Your judgement was clouded by your inability to imagine a world without onions. Imagine harder, then try again!
e) when they lose: Good.. good! Let the power of no onions flow through you!
f) when they tie: You are one step closer to enlightenment. Cast all onions from your mind, and you may yet defeat me.
playing style: their lack of onions is a handicap. they are unable to see more than a couple of moves ahead, because the concept of "layers" is alien to them

these are all amazing but I got to give it up for this one, :drat:

this is a good idea but I haven't come up with anything interesting to add yet, I'll see if I can't come up with something.

your friend sk

(ヤイケス!)


when messages are printed, do we have access to any metadata about the game? stuff like "the piece just lost", "final advantage", etc.

your friend sk

(ヤイケス!)




Harold OS
Skill level: 1976

Messages: (ignore anything needing information that isn't accessible)

a) Welcome message:
- "Welcome to Harold OS! Move any piece to continue."
- "ВНИМАНИЕ: Не удалось запустить режим гроссмейстера." CAUTION: Could not start grandmaster mode.
- "Shall we play a game?"
- (if you implement ASCII mode--see bottom) "Starting in terminal mode..."

b) when they take your piece:
- "Superiority metric incremented."
- "Determining point differential..."
- "CAUTION: Could not deploy consolation message."

c) when they lose a piece:
- "Initializing anti-cheat scan..."
- "WARNING: Could not learn from mistake."
- "CAUTION: Pointer to {lost piece} is null."

d) when they win:
- "I'm afraid I couldn't let you do that."
- "Awaiting congratulatory message..."
- "Only three more wins and they'll give me a robot body!"
- "END OF LINE."
- "Don't feel bad. No human could ever compete with 8 kilobytes of RAM."

e) when they lose:
- "Oh well. How about a nice game of thermonuclear war?"
- "It's ok, I'm just a guy dressed as a chess computer anyway."
- "Daisy, daisy..."
- "What did you say your clock rate was?"
- (if you implement the Konami code--see bottom) "Scanning database for Konami code..."

f) when they tie:
- "Interesting. The only winning move was not to play."
- "I knew we should have played Disc Wars instead."
- "A stalemate is very unsettling when operating in binary."
if end of game advantage is accessible:
- (if Harold OS has advantage) "ERROR: Could not convert advantage to checkmate."
- (if Harold OS has large advantage, > +5)) "Critical endgame failure. Running diagnostics..."
- (if player has advantage) "Half point recovered."
- (if player has large advantage, > +5) "Swindle successful!"

Playing style: Ideally, has an opening book with a simple AI so that he plays well until out of book. If that's not feasible, a decent AI that doesn't look more than three moves ahead is also good (though that's stepping on World Without Onions' strategy).

FOR BONUS POINTS:
- Entering the Konami code gives the player a second king (as close to the king's start square as possible), or alternately removes a random player pawn. Harold OS says "Nobody likes a cheater."
- Holding SHIFT when selecting Harold OS switches the game theme to ASCII (using either the standard KQBNR notation or the Unicode chess symbols: ♔♕♖♗♘♙♚♛♜♝♞).

Schweinhund

:derp:   :kayak:                                     

your friend sk posted:

when messages are printed, do we have access to any metadata about the game? stuff like "the piece just lost", "final advantage", etc.

I'll at least do [taken piece]. That should be easy. I'll see what I can do with all the other ideas.


All these submissions are great and I'm working on adding them.

Just some insight into the bot... It only looks at all current legal moves and then the opponents immediate responses. So it can't look too far ahead. But it's surprisingly good doing that. At the most difficult setting, it will probably destroy casual players and be a bit of a challenge for beginners. I'd say like a 600 level player. If I have it look any further ahead, it starts getting slow. I could probably optimize it better but it's kind of targeted towards casuals/beginners so I'm very happy with it as it is.

Also I can have it do specific openings.

Schweinhund

:derp:   :kayak:                                     
:siren: Here is the game, try it out! :siren:

https://byobchess.neocities.org

Notes:
the opponents are in order from easiest to hardest
this could use a lot more polish but it should be fine
this works best on desktop. It might be a bit janky on mobile

Feel free to submit more opponents and I'll try to add them.

Schweinhund fucked around with this message at 01:48 on Aug 2, 2022

Dr. Honked

eat it you slaaaaaaag

Schweinhund posted:

:siren: Here is the game, try it out! :siren:

https://byobchess.neocities.org

Notes:
the opponents are in order from easiest to hardest
this could use a lot more polish but it should be fine
this works best on desktop. It might be a bit janky on mobile

Feel free to submit more opponents and I'll try to add them.

LOL that's great!!

i beat my guy in 10000 moves because i suck at chess



thanks deep dish pete moss and Plant MONSTER

Manifisto


Schweinhund posted:

:siren: Here is the game, try it out! :siren:

https://byobchess.neocities.org

Notes:
the opponents are in order from easiest to hardest
this could use a lot more polish but it should be fine
this works best on desktop. It might be a bit janky on mobile

Feel free to submit more opponents and I'll try to add them.

hey that's pretty neat!


ty nesamdoom!

cruft

it's all pawns and they can only move backwards.

cruft

I didn't lose to dippy!

(It was a draw)

Ass-penny

lmao somehow it said I had a draw with quincy even though I'd captured all of their pieces but their king. somehow could not get checkmate. that's a lie, I know why that is, because i'm dumb as poo poo and awful at chess.

Macnult

Name: Clarence Caveperson


Skill level: Monolith

a) Welcome message: OOGA BOOGA!
b) when they take your piece: HAH!
c) when they lose a piece: GUH!
d) when they win: HAH! zheezhee
e) when they lose: GUH! zheezhee
f) when they tie: blech. zheezhee

Playing style: Favors the Ruy Lopez, the Sicilian Najdorf, and the Kings Indian Defence

cruft

Woo, I won against the onion in 17 moves!

BYOB Chess vs A World Without Onions, Aug 2, 2022

Hey, you could compress that URL pretty easily, hit me up if you'd like some strategies.

Schweinhund

:derp:   :kayak:                                     
I don't think I'm going to change it at this point but I am curious how you would compress it. It does store the whole board configuration in 6 characters so it is fairly compressed. :3: I don't think you can get it significantly shorter but I could be wrong.


Working on adding the caveperson. I think I will add new opponents in batches, so it might not be added to the site for a bit.

Schweinhund fucked around with this message at 00:46 on Aug 3, 2022

Chewbecca

Just chillin' : )

Schweinhund posted:

edit: :siren: https://byobchess.neocities.org/ :siren:

1)
-Name: lady who shitposts
-200x200 pixel drawn image of a character. I'm thinking from the shoulders up + transparent background might be best, but that's not required. Gifs will work.
-Skill level. Something like "newbie" "difficult" or you can have something silly. It should be somewhat short. idiot bitch
-Chat messages that the character will say. There can be multiple messages for each of these.
a) Welcome message: greetings or sup noobs
b) when they take your piece: pwned lol or quoting this
c) when they lose a piece: straight to the goldmine, op
d) when they win: ftmfw or 5, just 5
e) when they lose: much like your posting
f) when they tie: hell, same
-Then describe what their playing style should be and I will try to implement it. random and chaotic



My contribution, op :shobon: All names and sayings in bold.

Chewbecca fucked around with this message at 03:47 on Aug 3, 2022



Thanks to Heather Papps for sweet sig, click for more hot lady action


sigs by luvcow and Khanstant.
Click on Spoonville for a neat surprise



(┛◉Д◉)┛彡┻━┻ #YesNutNovember - add this to your sig if you love and support BYOB's own nut

Finger Prince


Imo it should be checkers. Chess is too hierarchical, checkers is like every move is a post and if you get to the other side of the board you get IK'd.

Macnult

nothing personal, dippy

barnold


what do u do when yuo're born to play fps? guess there's nothing left to do but play fps. boom headshot
rookbot gets ultra pwned by my massive brain


cruft

Schweinhund posted:

I don't think I'm going to change it at this point but I am curious how you would compress it. It does store the whole board configuration in 6 characters so it is fairly compressed. :3: I don't think you can get it significantly shorter but I could be wrong.

Okay, so you have a final state in the URL like this:

code:
71x73p|34P36x|21x23p|23P34x|31x32p|54B27x|20x64b|32P23x|41x32p|25N17x|01x02p|33Q37x|30x21q|07x27K37R47x|21x25q|25P16x|51x52p|32B54x|50x32b|32Q33x|64x46b|30Q32x|40x51k|46B57x|70x71r|30x33Q|51x62k|35B46x|52x53p|32Q33x|62x63k|55N67x|63x64k|32x62Q|54k64x|62x53Q
I'm guessing you are enumerating each space on the board (0-63), and the letters are the pieces. So you have 64 board positions and 12 pieces (6 each per color). That's 6 bits for the board position, 4 bits for the piece, and another 6 bits for the final board position, for a total of 16 bits. Base64 encoding increases size by 33%.

In your scheme, three moves takes (6 + 1) * 3 = 21 characters. The scheme I just outlined takes 2*3*(4/3) = 8 characters. And that's just re-using the scheme you already have: there are other efficiencies you can take advantage of, like not needing to specify the piece.

Typically a castle move is represented by the king moving two or three spaces, so you don't need to special case it in the encoding. En passant is similar.

It's not a big problem, really, but a really long game could wind up with a massive URL.

These are just things I think about with my information theory background, not flaws with your implementation. It's pretty fun, and I'm enjoying playing against a chess engine I can actually beat sometimes!

Schweinhund

:derp:   :kayak:                                     
It currently stores changes to the board at each turn. So 71x73p means make 7,1 blank and 7,3 a white pawn. Sometimes the rules of chess won't be followed (konami code @ Harold OS) so storing the piece[s] allows for weird stuff like that. Although I think I could have it assume a standard chess move when if's just 4 numbers. I'll add that to the to-do list.

I'll look into the 16 bit thing but it would probably take some time to figure out.

Chewbecca

Just chillin' : )
Honestly, almost every word itt has gone right over my head but fwiw I think this owns lol



Thanks to Heather Papps for sweet sig, click for more hot lady action


sigs by luvcow and Khanstant.
Click on Spoonville for a neat surprise



(┛◉Д◉)┛彡┻━┻ #YesNutNovember - add this to your sig if you love and support BYOB's own nut

cruft

Chewbecca posted:

Honestly, almost every word itt has gone right over my head but fwiw I think this owns lol

Yeah, seriously, don't worry about optimizing the URL, what's more important is you made a fun chess game.

I mean, unless you want to. Clearly you *are* the type of nerd who would program a Javascript chess game in your spare time, which, based on personal experience, appears to be correlated with wanting to optimize URLs by creating a binary packing algorithm.

cruft

Schweinhund posted:

Sometimes the rules of chess won't be followed

Check it out: mate in 1! :c00lbutt:

google THIS

Schweinhund posted:

It currently stores changes to the board at each turn. So 71x73p means make 7,1 blank and 7,3 a white pawn. Sometimes the rules of chess won't be followed (konami code @ Harold OS) so storing the piece[s] allows for weird stuff like that. Although I think I could have it assume a standard chess move when if's just 4 numbers. I'll add that to the to-do list.

I'll look into the 16 bit thing but it would probably take some time to figure out.

You could shrink things further by giving each piece a unique ID instead of merely specifying by type, so the square that becomes blank when a piece moves can be inferred. With 32 pieces that can easily be a single character. You can also use a delimiter that doesn't need to be encoded, like "-"

So "41x43p%7C44P46x%7C..." could become something like "43x-44y-..."

Schweinhund

:derp:   :kayak:                                     

google THIS posted:

You can also use a delimiter that doesn't need to be encoded, like "-"

I'll definitely do that. I didn't realize that was happening. I appreciate the suggestions!

cruft

I will say this is the most fun I've had playing chess in quite some time. You've made it dumb enough that I can beat it but still need to think things through.

So you have solidly hit the all-important cruft demographic.

cruft

Quincy kind of sucks, OP.

Fredrik1

Gopherslayer
:rock:
super cool, but I can't figure out how to castle?

Adbot
ADBOT LOVES YOU

google THIS

BYOB Chess vs A World Without Onions, Aug 3, 2022

So it turns out that all pawns get promoted to queen, or at least they do if the queen was captured. Also, it turns out I'm so bad at chess that I can't win with three queens

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply