[HN Gopher] Analog Chess
       ___________________________________________________________________
        
       Analog Chess
        
       Author : amichail
       Score  : 340 points
       Date   : 2023-01-13 16:55 UTC (6 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | bo1024 wrote:
       | How much space do pieces take up? I.e. how close do their centers
       | have to be for them to intersect and block or be captured?
        
       | adrianmonk wrote:
       | Now somebody make a chess engine to play this.
       | 
       | I bet it's possible to use the same approach as chess engines for
       | traditional chess. You might run into problems with the search
       | space being a tiny bit larger, though.
        
       | tromp wrote:
       | There's no mention of promotion. Is it not available, or when are
       | pawns considered to have reached the final rank?
        
         | squeaky-clean wrote:
         | Looking at the code it looks like it supports promotion, a pawn
         | is considered on the final rank when it's entire radius is on
         | that rank.
        
         | luxuryballs wrote:
         | if it were me I'd make it so the piece has to be touching the
         | far edge of the board, to follow with the theme
        
         | rm999 wrote:
         | If I am reading this correctly, a pawn past row 7 will
         | automatically be replaced by a Queen:
         | 
         | https://github.com/ehulinsky/AnalogChess/blob/main/analogche...
        
       | birracerveza wrote:
       | Interesting! /r/anarchychess will love this.
       | 
       | > One interesting side effect of this is that you can capture
       | multiple pieces at once. :)
       | 
       | Wouldn't it make more sense if it moved until it touched another
       | piece and thus capture it without overlapping?
        
       | MaceOutWindu wrote:
       | "I am in Electrical Engineering and I like writing shitty code to
       | piss off my Computer Science friends."
       | 
       | lol
        
         | [deleted]
        
       | scarmig wrote:
       | With optimal play, is there ever a reason to make a move that's
       | not an integral value?
       | 
       | Also, to the extent there is a benefit, does the full set of
       | floating points (presumably) get more advantage than just the
       | positions located midway between regular adjacent positions? And
       | how big an advantage does it offer? Could someone with access to
       | the floats beat someone ranked 500 points higher who doesn't?
        
         | britneybitch wrote:
         | I imagine it's pretty powerful to put your queen on the corner
         | of 4 squares so it can capture along two ranks and two files.
        
           | fsckboy wrote:
           | good point for sure, but in terms of relative power it's
           | probably the same, as it could then _be captured_ along two
           | ranks, files, diagonals, and a fair number of knight, and
           | even some pawn positions.
        
         | kvdveer wrote:
         | Yes, for example to capture two pieces at once, or threaten two
         | adjacent pieces.
        
           | Shared404 wrote:
           | Indeed, or to bypass a piece which is threatening a space by
           | moving into a different part of that space.
        
         | qsort wrote:
         | Any position where you'd be in zugzwang is a good example.
         | 
         | A more interesting question is how do you search the infinite
         | state space. Intuitively, many states that are formally
         | different aren't meaningfully different from each other and can
         | be assimilated.
         | 
         | Any bisimulation expert on HN? :D
        
       | kofejnik wrote:
       | Now we need Hikaru to stream it
        
       | alanbernstein wrote:
       | One thing that seems to be lost here is the color of the bishops.
       | I wonder if there is some constraint you could add for their
       | movement to get a sort of equivalent concept?
        
       | notmysql_ wrote:
       | Cool project! If the pieces don't render for you try installing
       | the SegoeUISymbol font from the internet
        
       | dragontamer wrote:
       | There seems to be a whole slew of "analog" games coming out for
       | classic discrete games.
       | 
       | For example, "Not Tetris" is an analog-Tetris.
       | https://stabyourself.net/nottetris2/
       | 
       | I certainly enjoy these games. So hopefully more people are
       | inspired to find analog-versions of other discrete or turn-based
       | games, lol.
       | 
       | I guess a more "serious" version of analog Tetris is perhaps
       | Tricky Towers, which is an excellent party game.
       | https://www.trickytowers.com/
        
         | Y_Y wrote:
         | I'm trying to go the other way and discretize golf
        
           | OisinMoran wrote:
           | Please say more! Very interested in this category in general.
           | Would love a version of basketball where the points are a
           | continuous function of distance from the basket rather than
           | discrete 2 & 3 pointers.
        
           | itcrowd wrote:
           | ... so that's what they meant by disc golf in college!
        
         | naet wrote:
         | Tricky towers was great fun when I played it a while back.
        
       | zabzonk wrote:
       | sad to see this was not chess on an analog computer. now, that
       | would be impressive!
       | 
       | one of my late mentors, dr mick bazin (university of london,
       | 1980s), used to demonstrate programming bacterial population
       | dynamics on an analog machine - plug-boards, dials and god knows
       | what. as a pretty good digital computing person, i found it all
       | baffling.
       | 
       | but nowt to do with the post, i guess.
        
         | osrec wrote:
         | "nowt"
         | 
         | From Yorkshire or a typo?
        
           | zabzonk wrote:
           | born in halifax
        
         | Eduard wrote:
         | > sad
         | 
         | > that would be impressive
         | 
         | :(
        
       | albertzeyer wrote:
       | And now make it also realtime...
        
         | birracerveza wrote:
         | With killstreaks, abilities and ultimates.
        
       | heystefan wrote:
       | Can anyone please ELI5 for us with the cheap seats and/or
       | cognitive disabilities. What's exactly different from regular
       | chess?
        
         | [deleted]
        
         | aaroninsf wrote:
         | In chess, piece locations are defined in terms of squares on
         | the 8x8 grid.
         | 
         | In this analog version, locations are defined continuously, the
         | checkerboard they move over is meaningful only to establish
         | starting positions, and then is purely aesthetic.
        
         | mkaic wrote:
         | Regular chess is played on an 8x8 grid of squares, and pieces
         | occupy one square at a time. They move along grid lines and
         | diagonals and there's no such thing as being "halfway" between
         | two squares. Every piece on the board has an X-coordinate
         | between A and H, and a Y-coordinate between 1 and 8.
         | 
         | In this version, the pieces are no longer constrained to having
         | integer coordinates. A pawn can be "halfway" between, say A2
         | and A3, or a queen could be sitting roughly in-between several
         | squares at once. In regular chess, pieces are captured when an
         | enemy piece moves to the same square as them. In this version,
         | since the grid doesn't exist any more, pieces are captured when
         | an enemy piece physically overlaps them.
         | 
         | It's kinda like normal chess is a low-resolution game with only
         | 64 possible locations, and this is a higher resolution version
         | of it where you aren't limited to just those 64 locations and
         | can slide continuously all across the board.
        
       | percentcer wrote:
       | [I know this isn't the main feature of the project, but] I think
       | if more chess clients offered the "view squares that are under
       | attack" overlay then the world would be a better place. So many
       | interesting, low-level casual games are destroyed by blunders.
        
         | cauthon wrote:
         | Seeing attacks and tactics _is_ playing chess. That's like
         | saying more FPS games need to offer aimbots because low-level
         | casual games are destroyed by missing headshots.
         | 
         | Both chess.com and lichess allow you to view attacks in the
         | analysis, but I don't think it should be available in-game.
         | Low-level or casual play in any setting is going to be
         | characterized by blunders, that's what makes it low-level and
         | casual.
        
         | mikebenfield wrote:
         | Since that feature isn't available on an actual board, it would
         | really hamper your development as a player to use it when
         | playing online.
        
           | franknstein wrote:
           | Maybe it would actually help to develop internal vision and
           | improve your chess.
        
             | alar44 wrote:
             | No, it does the exact opposite. It's like spell check. I
             | can't spell for shit anymore.
        
             | Shared404 wrote:
             | I could see that varying from individual to individual.
             | 
             | For me, I'm quite confident it would negatively impact my
             | skills as I would naturally start trying to offload that
             | mental load to the computer and forget how to do it.
        
       | soperj wrote:
       | "Do not expect the code to be stable under any modifications, but
       | you can try if you want I guess. Also there are barely any
       | comments sorry. I am in Electrical Engineering and I like writing
       | shitty code to piss off my Computer Science friends."
       | 
       | I love this.
        
         | ThisIsTheWay wrote:
         | The few comments that are in there are kinda funny too:
         | 
         | > #fucking awful global variable that is is changed by the
         | confirm() function of the pieces
         | 
         | > #math shit
         | 
         | > #i don't know what im doing
        
         | Aaronstotle wrote:
         | That and "run the latest .py file because I can't be bothered
         | to actually use version control" made me laugh
        
           | doodpants wrote:
           | This makes no sense to me. I mean, it's already on GitHub,
           | which is a version control system. So he's doing more work by
           | committing each version as a separate file, rather than
           | making modifications in place?
        
             | jfoutz wrote:
             | sometimes, especially when I'm trying to figure out
             | something new, I like keeping the old exploratory code so I
             | can grep through it or easily compare different approaches.
             | It's less cognitive load than dealing with tags or branches
             | or versions.
             | 
             | usually I end up with old/try1 old/try2 ... old/tryn
             | 
             | once I've worked out the way I really want to go, then I
             | nuke old.
        
               | OkayPhysicist wrote:
               | git checkout 0110deadbeef -- file.py >
               | new_name_for_temp_file.py
        
             | quantaseed wrote:
             | He probably bothered to learn "git add" "git commit -am"
             | "git push" and nothing else.
             | 
             | Or maybe his CS friends helped put it on github.
             | 
             | Or maybe he's just to piss us off :)
        
         | [deleted]
        
       | aaroninsf wrote:
       | I appreciate the humor and tone for sure,
       | 
       | but I am perplexed by the assertion that confirming or checking-
       | for `check` (as opposed to mate) is difficult.
       | 
       | Why is it not simply checking the attack surface of each piece
       | from its current position? I understand there is occlusion, but
       | that should be well-defined for collision-checking for taking
       | already.
       | 
       | I.e. is this not the rule: "if none of the opposing 16 positions
       | has the king's [prospective] position in their range of attack,
       | the position is clear." Where range-of-attack are already
       | defined.
       | 
       | If there is a problem with determining if a given range is subset
       | by occlusion, that would seem to make preclude determining
       | capture?
       | 
       | I must be missing something...
        
       | luxuryballs wrote:
       | would prefer to see this without the squares, just one giant
       | square
        
       | SilasX wrote:
       | >Sadly en passant (the funny move) is not implemented yet because
       | I have no idea how it would work.
       | 
       | That's ... straighforward enough, I think? En passant exists
       | because it feels unfair that a pawn could use its double-move
       | (here, >1.0 move) to bypass another pawn's capture.
       | 
       | So, in analog chess, the en passant rule would be "if a pawn move
       | of >1.0 passes through the capture zone of the other side's pawn,
       | that pawn retains the right to capture (on the next move) as if
       | it (the former pawn) had moved to a point within the capture
       | zone".
       | 
       | Still don't see why analog chess would be interest rather than
       | just frustratingly complex?
        
         | gliptic wrote:
         | Similarily, it should not be too hard to implement checkmate.
         | If, on your move, any of the opponent pieces can capture your
         | king and this remains true wherever the king moves, you're
         | mated. Should only require overlap detection between linear and
         | circular swept discs. EDIT: Ok, a bit more complex than that,
         | but still doable I think. Find a point on the king movement
         | lines that are at least one radius away from the union of the
         | capture areas.
         | 
         | You would also not be allowed to move the king anywhere where
         | the opponent can capture it.
        
           | [deleted]
        
           | [deleted]
        
         | AnotherGoodName wrote:
         | To make it more concrete: When a pawn moves more than distance
         | 1 it could leave behind a shadow at distance 1. Capturing that
         | shadow with a pawn captures that pawn.
         | 
         | It's effectively how you explain en passant to a new player.
        
         | MaceOutWindu wrote:
         | yeah in analog chess you could just check if the other pawns
         | near it collide in trajectories when doing the double move and
         | if they do then en passant is in effect.
        
         | huevosabio wrote:
         | I never thought of en passant like that! This makes a lot more
         | sense now, and feels less like a vestigial rule from some
         | version of chess.
        
       | korroziya wrote:
       | "Do not expect the code to be stable under any modifications, but
       | you can try if you want I guess"
       | 
       | Challenge accepted.
        
       | sireat wrote:
       | Lot of fun chess variants.
       | 
       | Reading about Lloyd Shapley (2nd in Game Theory after von
       | Neumann) I discovered that he was supposed to be master at:
       | 
       | https://en.wikipedia.org/wiki/Kriegspiel_(chess)
       | 
       | Basically chess with Fog of War.
        
       | mdtrooper wrote:
       | This remembers me to an oldie web but nice is:
       | https://www.chessvariants.com/
        
       | andrewfromx wrote:
       | "To win, you simply need to capture the opponent's king. This is
       | mainly because stalemate is basically impossible, as the king can
       | always move an infintesimal amount, and also because implementing
       | check/checkmate would destroy the last ounce of sanity I have
       | left."
        
         | logicallee wrote:
         | In chess, you win when you are "about to" capture the
         | opponent's king on your next move, which is called putting them
         | in check, and there's no way for the other side to avoid it
         | (block or move out of check).
         | 
         | So I've always found it very bizarre that if it's a player's
         | move, but any possible move would put their own king in check,
         | then it is a draw (rather than a loss).
         | 
         | This leads to a situation where one side can have almost no
         | pieces left, perhaps only the king, but still somehow draw
         | since the king can't move anywhere where it wouldn't be
         | captured.
         | 
         | I imagine a king all by himself peeping his head out out for a
         | place to move, but everywhere is covered by snipers, so, since
         | he can't move anywhere without getting captured, despite being
         | overwhelmed by enemy forces he yells out a la monte Python "So
         | we'll call it a draw then!"
        
           | pbhjpbhj wrote:
           | Maybe if you think of it in terms of the opposition falling
           | to put you in check despite you only having a king left? Your
           | army chased the opposing king to the forest but failed to
           | defeat him, be gets to live out his days as a hermit. You are
           | denied 'satisfaction'.
           | 
           | ?
           | 
           | In my family, against my children, it's a running joke that
           | I'll almost always fail to win, and stalemate them.
        
           | hgsgm wrote:
           | It's because chess was invented by programmers, and stalemate
           | means "the game is broken because there are no legal moves so
           | it's impossible to continue", so we call it a draw.
        
             | a_cardboard_box wrote:
             | You can also tell it's made by programmers because of the
             | _en passant_ "feature", which clearly only exists due to
             | the programmers' incomplete implementation of the 2-square
             | first move.
        
         | bspammer wrote:
         | > the king can always move an infintesimal amount
         | 
         | I don't think this is true, it should be perfectly possible to
         | cover the opponent's king's entire movement area with your
         | pieces.
         | 
         | I'd love to see a version of this game that actually implements
         | this :D
        
           | gmoot wrote:
           | Then it's checkmate, not stalemate. For a stalemate you need
           | a situation where the king is not in check, but there are no
           | legal moves. It seems impossible in practice, if not in
           | theory.
        
         | timerol wrote:
         | "Warning: This code is fucking awful.
         | 
         | Do not expect the code to be stable under any modifications,
         | but you can try if you want I guess. Also there are barely any
         | comments sorry. I am in Electrical Engineering and I like
         | writing shitty code to piss off my Computer Science friends."
         | 
         | I appreciate this README's sense of humor
        
           | bunnie wrote:
           | I can relate to this!
        
           | knodi123 wrote:
           | lol, "Run the .py file with the highest number, because I
           | can't figure out version control." Says the guy who posted it
           | to github.
        
         | bertil wrote:
         | There's something profound here about how the very natural
         | conventions in Chess ("If you did that, you'd lose, so I'd
         | rather we continue playing") have redefined "valid" in a way
         | that is surprisingly hard to re-implement with code.
        
           | gmiller123456 wrote:
           | You can make illegal moves in over the board chess, and
           | sometimes it's advantageous to do so. E.g. In blitz chess an
           | invalid move is an immediate loss. So, if you're going to
           | lose anyway, you can make an invalid move hoping your
           | opponent doesn't take the time to notice. One common one is
           | to move your king next to your opponent's king, putting their
           | king in check, if they don't call you on it, and don't move
           | their king out of check, they lose. Unofficially, this is
           | considered part of the game in blitz, but is considered
           | unsportsmanlike in long games (where it's not an immediate
           | loss).
        
             | distortedsignal wrote:
             | Is that... true? Are there tournament rules that say that?
             | I'm not much of an OTB player, but this strikes me as
             | somewhat against the spirit of the game. I will freely
             | admit that I don't play blitz unless it's on a computer (I
             | hate chess clocks) and computers don't allow illegal moves,
             | but I would be very surprised if tournaments operated like
             | this. Even small, local tournaments.
        
               | kanzenryu2 wrote:
               | I remember reading about a serious tournament game where
               | somebody castled twice. Nobody noticed during the game. I
               | wonder how many computer databases allow that game to be
               | entered.
        
               | crdrost wrote:
               | Longer games go by FIDE's "Laws of Chess" which has a
               | section 7 called "Irregularities" that indeed specifies
               | the behavior if you accidentally knock over pieces or the
               | game board falls over or you make an illegal move (moving
               | away a piece that was keeping you from check etc).
               | 
               | Resolving irregularities does require your opponent to
               | notice the irregularity and bring it to the attention of
               | the referee.
               | 
               | Not sure about Blitz.
        
             | [deleted]
        
             | kanzenryu2 wrote:
             | From memory it wasn't so long ago that the laws of chess
             | "allowed" you to play an illegal move to cause a checkmate
             | (e.g. Qd1xf7 mate). Your opponent would say "hey that's an
             | illegal move, take it back". You could then say "according
             | to this rule, taking back illegal moves can only be done
             | during a game, and according to this other rule, checkmate
             | immediately ends the game".
             | 
             | Note that it can be discovered during a game that a move
             | several turns ago was actually illegal, and the board
             | should be returned to that position (and times adjusted). I
             | had this happen to me once.
        
               | shuntress wrote:
               | The "checkmate immediately ends the game" rule gets
               | really weird in 3-chess.
        
           | AstixAndBelix wrote:
           | you can't represent the real plane on a computer. you can
           | only have a limited amount of precision that effectively
           | results in very dense grid, but a grid nonetheless
        
             | jakear wrote:
             | are you able to represent it some place else?
        
               | AstixAndBelix wrote:
               | what does this mean?
        
             | bspammer wrote:
             | I don't think it can even be called a grid, as the gaps
             | between points aren't the same length.
        
               | AstixAndBelix wrote:
               | depends on your choice of floating point standard, you're
               | right for the current IEEE one
        
               | ErikCorry wrote:
               | If the gaps are all the same size, isn't it fixed point
               | rather than floating point?
        
           | cmeacham98 wrote:
           | It is very easy to implement with code. Chess computers are
           | some of the first well-known computer programs (see, for
           | example, Deep Blue).
           | 
           | What is difficult is adapting chess's rules to this analog
           | environment. It would be similarly difficult if you played
           | this way with a real chess set in the real world, has nothing
           | to do with code.
        
         | masswerk wrote:
         | Chess meets Tablut / Hnefatafl...
         | 
         | (I guess, Vikings would appreciate the constraints arising from
         | infinitesimal granularity movement.)
        
       | usgroup wrote:
       | I could imagine myself thinking through what a continuous version
       | of chess might look like, but actually having enough give--
       | a-f__ck to implement it is other worldly to me.
       | 
       | What drives you internet stranger?
        
       | dragontamer wrote:
       | > Pawn: May move 0-2 squares on it's first move, 0-1 otherwise.
       | Can only attack diagonally. Sadly en passant (the funny move) is
       | not implemented yet because I have no idea how it would work.
       | 
       | Just "enlarge" the Pawn whenever it moves more than 1 square.
       | 
       | Ex: if the pawn moves 2 squares, it is now a 2x1 piece. It will
       | return to size 1x1 after its next move. If you wanna be "only"
       | Pawns participating, ensure that the enlarged region can only be
       | affected by other pawns.
       | 
       | Ex2: If the pawn moves 1.5 squares, it is now a 1.5x1 piece.
        
         | rcme wrote:
         | That would allow any piece to capture a pawn on the adjacent
         | file after a 2 square move. That would make 2 square moves bad,
         | which would slow the game down.
        
           | dragontamer wrote:
           | That's literally the point of en-passant. To "punish" players
           | who do a 2-square move.
           | 
           | It shouldn't be too hard to have Pawns only be able to
           | capture in this manner. And if you wanted to "reset the size"
           | at the beginning of each player's turn. (Ex: White's pawns
           | reset from 1.5x1 size into 1x1 size at the start of White's
           | turn), then that basically covers en-passant.
        
             | operator-name wrote:
             | What rcme seems to be pointing out is that in normal chess
             | only pawns can en passant, whereas if you grew the size of
             | the pawn non-pawn prices would also be able to take it.
        
               | dragontamer wrote:
               | > It shouldn't be too hard to have Pawns only be able to
               | capture in this manner.
               | 
               | So you have two regions. The 1x1 region of the pawn, and
               | the 1.5 x 1 "en passant" region of a pawn that moved 1.5
               | squares as its first thrust. The 1.5x1 region can only be
               | targetted by enemy pawns. If an enemy bishop lands in the
               | 1.5x1 region, it still needs to check if its the 1x1
               | "original pawn" region to have the pawn captured.
        
             | pprotas wrote:
             | It is not the point to punish a player for a 2-square move.
             | 
             | The rule only punishes players that use the 2-square move
             | to "block" an advancing pawn. This is a very specific
             | situation!
        
               | dragontamer wrote:
               | > The rule only punishes players that use the 2-square
               | move to "block" an advancing pawn
               | 
               | I think you need to study En Passant a bit more. E2 to E4
               | is _not_ captured by the E5 black pawn, but instead by
               | the D4 or F4 black pawn.
               | 
               | The E-black pawn is meaningless in regards to the En
               | Passant rule. All that matters is that E2 (original
               | location of white pawn) "passes through E3" on its way to
               | E4, so F4 and D4 black pawns have an opportunity to kill
               | it.
        
           | toast0 wrote:
           | Need to make the pawn elongate only for move checking with
           | other pawns. A little tricky, because now you need a shadow
           | board, but shouldn't be too bad?
        
       | panki27 wrote:
       | I love the versioning approach here - use git but still create
       | fileV1.py, fileV2.py...
        
         | FpUser wrote:
         | I did not look at their particular code but I had files named
         | like this in my projects: api_v1, api_v2. Reason being that the
         | software V2 still supported v1 api so both were present and
         | needed.
        
           | actinium226 wrote:
           | A reasonable approach but from the README:
           | 
           | "To run the code you will need to install Python and the
           | PyGame library, and then run the latest .py file because I
           | can't be bothered to actually use version control."
        
             | ChildOfEru wrote:
             | I'm just reminded of the last line of the README.md
             | 
             | "I am in Electrical Engineering and I like writing shitty
             | code to piss off my Computer Science friends." -- https://g
             | ithub.com/ehulinsky/AnalogChess/blob/main/README.md...
        
           | The_Colonel wrote:
           | It's a relatively common approach in e.g. web services, but
           | not in standalone games.
        
       | TheRealNGenius wrote:
       | [dead]
        
       | jdlyga wrote:
       | This reminds of switching from Disgaea, a grid-based tactical
       | RPG, to Phantom Brave, which ditched the grid and handled combat
       | using distances.
        
         | LoveMortuus wrote:
         | I love Disgaea, especially the freedom it gives you to grind
         | and build your character (singular, because all the others will
         | betray you :P).
        
       | jtolmar wrote:
       | Hilarious idea, very nice.
       | 
       | A dumb thing I found - If you move the knight's pawn, it's just
       | barely possible to, over the course of many moves, slip your rook
       | diagonally through to that pawn's former space.
        
       | Shared404 wrote:
       | Saw en passant so googled it...
       | 
       | holy hell.
        
         | tspike wrote:
         | It's pretty fun surprising someone who is not familiar with it,
         | in a sadistic sort of way.
        
           | ssl-3 wrote:
           | It used to be a potential invitation for a fist-fight before
           | we had pocket computers with which the aggrieved (and
           | unaware) player could verify the move's legality.
        
           | qsort wrote:
           | Also true for some other little rules people often forget,
           | like underpromotion, castling through/out of check,
           | stalemate, perpetual, 50 moves, etc.
           | 
           | Plus the general topic of how to use clocks.
           | 
           | Chess is so popular that most people first learn to play from
           | parents, relatives, etc., so they might not have learned the
           | full rules if they aren't interested in learning the game
           | more seriously.
        
             | unsafecast wrote:
             | You say underpromotion, but something people are surprised
             | by is making a second queen ime. People sometimes assume
             | promotion is actually "taking a captured piece back".
        
           | Shared404 wrote:
           | This is true.
           | 
           | I've taken to asking players who are unfamiliar with the game
           | if their familiar with it on occasion, at least ones who I
           | expect will be more frustrated than amused.
        
         | function_seven wrote:
         | One modification to this game I'd like to make is adding the
         | missing knook piece.
         | 
         | But sadly I don't think I'm up for it: _Do not expect the code
         | to be stable under any modifications, but you can try if you
         | want I guess._
        
           | newaccount74 wrote:
           | What's a knook? A mix between knight and rook? How would it
           | work?
        
           | coeneedell wrote:
           | Looking at the code adding another piece should be doable
           | since I don't think any pieces call other pieces attributes,
           | and the pieces at game start are just objects in a list...
        
           | Shared404 wrote:
           | Build the board out of bricks and it's both stable amd you
           | get easy access for bricking online!
        
       | jimhi wrote:
       | If you want to play in the browser instead of setting this up
       | locally I made a replit:
       | https://replit.com/@jamespsteinberg/AnalogChess-1
        
         | mzs wrote:
         | All the pieces are simply labeled with rectangles as if the
         | font is not present for me. Any ideas? Also thanks!
        
           | ddalex wrote:
           | Do you have web font blocking setup in the browser?
        
             | anamexis wrote:
             | I don't, and I see squares. This is Safari on iOS
        
           | Eduard wrote:
           | Same for me. Kinda feels like Stratego :)
        
           | HALtheWise wrote:
           | https://replit.com/@EricMiller8/AnalogChess-fixed-icons?v=1
           | should have working icons. There's still some weird issue for
           | me with the cursor not displaying in fullscreen.
        
         | hammock wrote:
         | Sweet thanks. The board takes up more space than the window.
         | How do I zoom out?
        
           | jimhi wrote:
           | There's a button with two diagonal arrows that lets you enter
           | fullscreen mode although you might have to scroll a bit to
           | get it to show. Otherwise, you might have to fork the replit
           | and make an account. It's free.
        
             | Eduard wrote:
             | On Pixel 4a Android / mobile / touch-only, even when
             | clicking the diagonal arrows, the board is clipped; both in
             | Chrome Android's default mode as well as when activating
             | "Desktopwebsite" mode
        
       | brofallon wrote:
       | There's a special place in my heart for any project in which the
       | Readme says "Warning: The code is fucking awful"
        
         | shrx wrote:
         | It did not disappoint :)
        
       | revskill wrote:
       | The code is readable, and at the same time, unmaintainable. Good
       | job.
        
       | dtech wrote:
       | Bit weird to call it analog while continuous is meant. Any chess
       | on a physical board is analog.
        
         | dragontamer wrote:
         | Analog is the study of continuous circuits.
         | 
         | Digital is the study of (usually) binary circuits.
         | 
         | --------
         | 
         | Ex: an OpAmp is called an analog computer sometimes, because
         | you can do things like Add, Subtract, Multiply, Divide,
         | exponent, differentiate, or integrate voltages. (ex: 0.543V +
         | 1.1V == 1.643V output). This is troublesome in practice because
         | a bit of noise (ex: +.05V error) propagates.
         | 
         | This is in contrast to a digital computer, which encodes data
         | into 0 or 1. There are things like PAM4 which encodes data as
         | 0, 1, 2, or 3 (2-bits per signal), or other such "discrete
         | steps". But the overall concept of "snapping" data to specific
         | voltage levels allows you to fix noise issues.
        
         | RaoulP wrote:
         | Agreed. But I suppose the creator (an electrical engineering
         | student) thinks of continuous vs. discrete in terms of analog
         | vs. digital signals.
        
         | actinium226 wrote:
         | I know what you mean, but I guess analog electronics are
         | continuous? The author notes at the end of the README that he's
         | an electrical engineer so maybe that's where it's coming from.
        
       | actinium226 wrote:
       | This readme is :fire: XD XD XD
        
       | somethingAlex wrote:
       | I don't think the knight should be allowed to move in a full
       | circle. It should be disjointed - four arches. Allowing a knight
       | to move two squares orthogonally kind of makes it a completely
       | different piece.
        
         | hgsgm wrote:
         | It's like a completely different game, analog/continuous
         | instead, of digital/discrete.
        
         | a_cardboard_box wrote:
         | It's not moving 2 squares orthogonally. It's moving sqrt(5)
         | squares orthogonally. In normal chess, the knight can move to
         | any square which is exactly sqrt(5) units away.
        
         | whimsicalism wrote:
         | If the knight can move in a full circle, the bishop by the same
         | principle should be able to move anywhere on the board.
        
           | aidenn0 wrote:
           | The bishop can, with two moves, move anywhere on the board
           | (unlike in traditional chess).
        
         | mikepurvis wrote:
         | I wondered about this too. I think I resolved it in my mind by
         | seeing the game as granting every piece _one_ degree of freedom
         | that goes from discrete to continuous: for most of the pieces,
         | it 's distance from the origin, since they move in straight
         | lines. But knights are already more constrained than that
         | anyway, so for knights, the continuous DoF is axial instead.
         | 
         | This also makes sense when you put any given piece in the
         | middle of an empty board and plot all of its potential moves--
         | for every piece but the knight, "joining up" their possible
         | landing sites gives continuous distances from the starting
         | point, but if you join up a knight's landing sites, you get a
         | circle of r=[?]5.
         | 
         | So in short, I agree with the OP's decision on how to handle
         | knights.
        
       | c3534l wrote:
       | Edit: nevermind. I guess I didn't have enough coffee because I
       | completely misinterpreted this.
        
         | NeoTar wrote:
         | In regular chess you can only move discrete distances (1, 2, 3
         | squares, etc.) - this is analogue in the sense that pieces can
         | move continuous distances.
        
         | [deleted]
        
         | nabogh wrote:
         | I don't see how this is a donut topology. If it were you could
         | move off the sides and end up on the other side of the screen.
         | Like Pac-Man or Asteroids.
         | 
         | It's analog because you can move any continuous distance. Not
         | just a discrete number of tiles.
        
       ___________________________________________________________________
       (page generated 2023-01-13 23:00 UTC)