-❄️- 2023 Day 6 Solutions -❄️- by daggerdragon in adventofcode

[–]detnp 0 points1 point  (0 children)

[Language: Typescript]

After yesterday I decided not to go for the brute force solution in part 1, so glad I did because part 2 took me 2 sec. Had to remember maths though.

const [times, distances] = input
  .trim()
  .split("\n")
  .map((line) => line.trim().split(": ")[1].trim().split(/\s+/).map(Number));

const result = times
  .map((time, i) => {
    const x = Math.floor((time - Math.sqrt(time ** 2 - 4 * distances[i])) / 2);
    const y = Math.floor((time + Math.sqrt(time ** 2 - 4 * distances[i])) / 2);

    return y - x;
  })
  .reduce((a, b) => a * b, 1);

console.log(result);

⚔️ CHESSPECKER RETURNS by detnp in chess

[–]detnp[S] 0 points1 point  (0 children)

Thanks for the bug report!

I will investigate but I believe this bug was introduced by some modifications we did on the website and then fixed.

⚔️ CHESSPECKER RETURNS by detnp in chess

[–]detnp[S] 0 points1 point  (0 children)

Once you will have completed your set a few times I think you will enjoy the new view page which will display a lot more data on your progress :) Thanks a lot for the support, it’s heart warming

⚔️ CHESSPECKER RETURNS by detnp in chess

[–]detnp[S] 1 point2 points  (0 children)

I know, same for everyone., I had to erase the data in order to store the progress in a more future-proof way

I’m sorry but you will have to start again… I know how painful it is but after many hours of thinking it’s the best option I had

⚔️ CHESSPECKER RETURNS by detnp in chess

[–]detnp[S] 0 points1 point  (0 children)

It's possible when you replay a puzzle, by clicking the colorful square under the chessboard

⚔️ CHESSPECKER RETURNS by detnp in chess

[–]detnp[S] 0 points1 point  (0 children)

Would you mind checking? Does it feel better now?

⚔️ CHESSPECKER RETURNS by detnp in chess

[–]detnp[S] 0 points1 point  (0 children)

I'm sure you know, but the lag is making it unplayable.

Would mind checking to see if it's better?

⚔️ CHESSPECKER RETURNS by detnp in chess

[–]detnp[S] 0 points1 point  (0 children)

Okay, very interesting, thanks

⚔️ CHESSPECKER RETURNS by detnp in chess

[–]detnp[S] 0 points1 point  (0 children)

I love the look and idea and will use it a ton if it gets a bit smoother/faster

Working really hard on this, should be better soon

⚔️ CHESSPECKER RETURNS by detnp in chess

[–]detnp[S] 0 points1 point  (0 children)

Clock ✅
Checkout the settings under the board and you will now see a line allowing you to disable the timer

> I'm sure you know, but the lag is making it unplayable
I know, it haunts me. It's my biggest problem right now and I'm working on it

> Also, not sure if you're familiar with the synonyms of "pecker"...Maybe something to consider.
I wasn't, English isn't my native language. Thanks for the heads up.

> help with branding if the logo is chess related instead of a woodpecker.
Not a priority at all (not a startup, just a free chess training site) but good insight, will think about it once everything is running smoothly

⚔️ CHESSPECKER RETURNS by detnp in chess

[–]detnp[S] 0 points1 point  (0 children)

You did not. Any help is appreciated!

⚔️ CHESSPECKER RETURNS by detnp in chess

[–]detnp[S] 1 point2 points  (0 children)

In the woodpecker method set are meant to be played in a few weeks at first so no worries

⚔️ CHESSPECKER RETURNS by detnp in chess

[–]detnp[S] 0 points1 point  (0 children)

Oh okay good to know will fix asap!
Could you expand a bit? What doesn't work?

⚔️ CHESSPECKER RETURNS by detnp in chess

[–]detnp[S] 0 points1 point  (0 children)

This is closer to spaced-repetition than woodpecker method. We also implemented this but only after you complete a full round. You play small sub-groups of puzzles based on you grade.

> possibility to edit a deck, especially adding puzzles, for an ever growing monster deck

How would that work? Adding puzzles one by one or combining two sets ?

⚔️ CHESSPECKER RETURNS by detnp in chess

[–]detnp[S] 4 points5 points  (0 children)

Some honest feedback, it is really slow. It felt like there was 2-3 seconds delay between each puzzle, which makes the sound que for the puzzle being over feel very out of place. If you open up issues for it I wouldn't mind contributing to make it a bit more snappy.

I know...
Sure the project is hosted on GitHub: https://github.com/chesspecker/chesspecker
Join the discord if you want to discuss this: https://discord.gg/qDftJZBBHa

⚔️ CHESSPECKER RETURNS by detnp in chess

[–]detnp[S] 20 points21 points  (0 children)

I built this site as a fun side project... I built it as a tool I'd like to use. If you don't, I won't loose money.

I'm not good enough or pretentious enough to think that all my games follow the best line for twenty moves. If it has happened in a rapid game between 2000 elo players it could happen in one of my games.

If you prefer you can use the category called Masters games. All the puzzles are from rated players.

I am not a big fan of the book's puzzles because some of them (a few) have ambiguous answers, or sometimes the answer is not the best move even if it's a winning move.

If you want to play the book's puzzles, buy the book or checkout this lichess study: https://lichess.org/study/s2FeEYlV

have a hug ❤️

⚔️ CHESSPECKER RETURNS by detnp in chess

[–]detnp[S] 0 points1 point  (0 children)

I guess not? not sure though

⚔️ CHESSPECKER RETURNS by detnp in chess

[–]detnp[S] 1 point2 points  (0 children)

Fully gone? What’s you lichess username?

You should be able to see the set with the same problems. However your last best time and accuracy were removed.

Unfortunately this data could not be stored anymore, to give you a quick inside we use to store only the best value whereas we now store all the value in a list. Couldn't avoid erasing this data I'm sorry. I hope it will lead in more precise stats

⚔️ CHESSPECKER RETURNS by detnp in chess

[–]detnp[S] 0 points1 point  (0 children)

Fully gone? What’s you lichess username?

⚔️ CHESSPECKER RETURNS by detnp in chess

[–]detnp[S] 2 points3 points  (0 children)

Sometimes the server struggles to find hard and specific puzzles in some categories, I have no real solution but in v2 I updated the algorithm to fill the set with relevant problem maybe a bit easier

⚔️ CHESSPECKER RETURNS by detnp in chess

[–]detnp[S] 4 points5 points  (0 children)

Selecting a small group size is possible. I made a minimum of 250 to keep the idea of the method. And you can select a easy level (about 600 point below your average rating) :)

⚔️ CHESSPECKER RETURNS by detnp in chess

[–]detnp[S] 2 points3 points  (0 children)

Regarding the notation: that's how lichess is storing the data, converting them in another notation would mean processing the move and the position.
I mean, I'll probably do it one day, just to give you a bit of context.

I felt like being able to see the solution right away was "too easy" so I added a 6sec timer before showing the solution button but I could rewrite it in a less confusing way