2024/10/18

Newest at the top

2024-10-18 20:14:57 +0200CrunchyFlakes(~CrunchyFl@ip1f13e94e.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
2024-10-18 20:14:07 +0200 <EvanR> but is more data
2024-10-18 20:13:13 +0200 <EvanR> the moves route is more theoretically interesting, assuming you upgrade it to allow combining moves, now you have a semigroupoid
2024-10-18 20:12:49 +0200merijn(~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds)
2024-10-18 20:12:37 +0200EvanR_EvanR
2024-10-18 20:11:52 +0200EvanR_(~EvanR@user/evanr) EvanR
2024-10-18 20:11:49 +0200EvanR(~EvanR@user/evanr) (Read error: Connection reset by peer)
2024-10-18 20:11:15 +0200LukeHoersten(~LukeHoers@user/lukehoersten) LukeHoersten
2024-10-18 20:10:10 +0200 <EvanR> all you need is the history of moves
2024-10-18 20:10:08 +0200 <haskellbridge> <magic_rb> You can also store "[Move]" but i feel like thats harder to get right
2024-10-18 20:10:04 +0200 <EvanR> but they're redundant
2024-10-18 20:09:58 +0200 <EvanR> well you have these board positions
2024-10-18 20:09:50 +0200 <haskellbridge> <magic_rb> Wdym redundant, having the history is the state
2024-10-18 20:09:48 +0200 <EvanR> and you don't need it anymore since you have history
2024-10-18 20:09:41 +0200 <EvanR> the state stops becoming a good summary of what happened
2024-10-18 20:09:34 +0200 <haskellbridge> <magic_rb> Which then would allow you to generate a tree of all possible states
2024-10-18 20:09:21 +0200 <EvanR> when you have the entire history of something, sometimes that's making the "state" redundant
2024-10-18 20:09:13 +0200 <haskellbridge> <magic_rb> And then check if the given move is in that set
2024-10-18 20:09:02 +0200 <haskellbridge> <magic_rb> You can also generate the list of valid moves given a list of boards
2024-10-18 20:08:45 +0200 <EvanR> so much for elegance xD
2024-10-18 20:08:37 +0200 <EvanR> ......... yeah
2024-10-18 20:08:29 +0200 <haskellbridge> <magic_rb> Thats why you need `someCheck :: [Board] -> Bool
2024-10-18 20:08:14 +0200 <EvanR> that's the rub
2024-10-18 20:08:03 +0200 <EvanR> in a single board
2024-10-18 20:07:58 +0200 <EvanR> there's not enough info
2024-10-18 20:07:58 +0200merijn(~merijn@128-137-045-062.dynamic.caiway.nl) merijn
2024-10-18 20:07:57 +0200jinsun(~jinsun@user/jinsun) (Read error: Connection reset by peer)
2024-10-18 20:07:48 +0200 <haskellbridge> <magic_rb> The datatype doesnt prevent you from making illegal moves, the checks around it do
2024-10-18 20:07:34 +0200LukeHoersten(~LukeHoers@user/lukehoersten) (Ping timeout: 260 seconds)
2024-10-18 20:07:05 +0200 <int-e> But yes, you do need extra state on top of that. Just to reaffirm what has been said already :)
2024-10-18 20:07:00 +0200 <EvanR> if you wanted to e.g. generate the tree of all games
2024-10-18 20:06:45 +0200 <EvanR> in the sense of stopping you from making illegal moves
2024-10-18 20:06:27 +0200 <EvanR> it's just not enough to play actual chess on
2024-10-18 20:06:19 +0200 <int-e> (Using 64 bit masks for each type of pieces is a thing ("bitboards") but if you worry that much about performance then why are you using Haskell :P)
2024-10-18 20:05:50 +0200 <EvanR> sure
2024-10-18 20:05:45 +0200 <haskellbridge> <magic_rb> And for the board it could be "Map (Int, Int) ChessPiece"
2024-10-18 20:05:42 +0200 <EvanR> yeah this sounds like a simplification of chess, it could collapse a lot
2024-10-18 20:05:18 +0200 <haskellbridge> <magic_rb> Or just "[Board]"
2024-10-18 20:05:07 +0200 <EvanR> because reasons
2024-10-18 20:05:06 +0200 <haskellbridge> <magic_rb> Then you take N for each function
2024-10-18 20:04:52 +0200 <EvanR> sure, you might be able to compute a move from two boards. Though that's not enough to know what the possible moves are for a given board
2024-10-18 20:04:47 +0200 <int-e> To work with the board you do want an efficient map from positions to pieces though.
2024-10-18 20:04:45 +0200 <haskellbridge> <magic_rb> Well not directly, essentially "didPawnMove :: Board -> Board"
2024-10-18 20:04:33 +0200BolzmannPain2(~BolzmannP@2a0a-a546-bba0-1-bf7d-3159-648d-4f72.ipv6dyn.netcologne.de) (Ping timeout: 256 seconds)
2024-10-18 20:03:30 +0200 <EvanR> a diff of boards
2024-10-18 20:02:51 +0200alexherbo2(~alexherbo@2a02-8440-3207-4943-39e2-af68-9f9c-c108.rev.sfr.net) (Remote host closed the connection)
2024-10-18 20:01:57 +0200LukeHoersten(~LukeHoers@user/lukehoersten) LukeHoersten
2024-10-18 20:01:15 +0200BolzmannPain13(~BolzmannP@2a02:3035:669:c97c:b0c7:d528:345d:3a36)
2024-10-18 19:57:57 +0200athan(~athan@syn-173-042-095-241.biz.spectrum.com) (Ping timeout: 252 seconds)
2024-10-18 19:57:16 +0200 <haskellbridge> <magic_rb> Everything else is computed from that, like whether a pawn moved by 2 squares or whatever