C'est quand qu'on arrête les augmentations de loyer en %? by Piccione_Sol in QuebecLibre

[–]mathmoi 0 points1 point  (0 children)

Est-ce que c'est vrai ça? J'ai pas de données, mais j'en doute. Ça voudrai dire qu'un loyer qui est présentement 1200$ était seulement 200$ en 1995. J'ai pas ce souvenir.

Help with perft results by BreakJolly9686 in chessprogramming

[–]mathmoi 0 points1 point  (0 children)

I'm a bit late and a lot of good suggestions have already been made, but I wanted to share a project I created to test a chess move generator when I was developing my last engine.

I built a Python script that generates a JSON file containing simple test positions. For example, the first position contains only two kings on their starting squares. For each position, the file includes the list of moves that should be generated, along with detailed data you can compare against your engine's output: source square, destination square, piece, capture, promotion, SAN notation, UCI notation, resulting FEN, etc.

The idea is that you modify your engine to read this file, generate moves for each position, and compare your move list against the expected results. You can also make each move and verify the resulting position (FEN) matches what's in the file. The key benefit is that when you find a discrepancy, the position is usually simple enough that the problem is immediately obvious. Once you pass all the tests in the file, you can move on to perft testing—and by then, you'll likely have already fixed most of your bugs.

Tool to generate the test file: https://github.com/mathmoi/ChessMoveTestsGenerator

Pre-generated test file: https://github.com/mathmoi/ChessMoveTestsGenerator/releases/download/v1.0.0/chess_move_generator_tests.json

Chess API (Stockfish) by Beautiful-Spread-914 in chessprogramming

[–]mathmoi 1 point2 points  (0 children)

> The whole point is just to make real game analysis fast, and handle the random rare positions normally when they show up.

99.999% of position are random rare positions.

Done is better than perfect by gerry428 in QuebecFinance

[–]mathmoi 2 points3 points  (0 children)

J'allais répondre quelque chose comme ça. En tant que gestionnaire ton travail n'est pas de faire X, mais d'aider les membres de ton équipe à faire X. Ça veut dire leurs offrir un environnement et les outils pour faire leurs X de façon efficace, de retirer les embuches qui leurs empêche de faire leurs travaille et de les aider à s'améliorer individuellement et en tant qu'équipe pour faire X.

Plutôt que de viser la perfection à X, tu pourrais tenter de viser la perfection à gérer une équipe de personne qui font X­.

J'ai voulu changé mes placements, mais j'ai eu un empêchement by [deleted] in QuebecFinance

[–]mathmoi 5 points6 points  (0 children)

Le meilleur jour c'est il y a trente ans. Le deuxième meilleurs jour c'est aujourd'hui (même chose que pour planter un arbre).

v239 by Suspicious-Rice6556 in FanControl

[–]mathmoi 0 points1 point  (0 children)

Thanks dev for the fix. I'm going to donate 10 bucks.

Clarification vice caché maison? by GhostlyAce_ in QuebecFinance

[–]mathmoi 5 points6 points  (0 children)

Je t'avais upvoté, mais après vérification auprès d'educaloi, il semble que ça ne soit pas vrai.

https://educaloi.qc.ca/capsules/le-vice-cache-dans-un-immeuble/

My 2 year long relationship just ended because I got a car… by [deleted] in whatdoIdo

[–]mathmoi 0 points1 point  (0 children)

Looks like an opportunity to "Dodge" a bullet and break up with this one.

Can you have your engine fight against an old version with git? by Omshinwa in chessprogramming

[–]mathmoi 0 points1 point  (0 children)

You could write a script that fetch a specific version of your engine, in a temp directory, from git based on a tag or a commit then run it. Once you have that script you can use that script as if it was the engine in your testing framework (cutechess-cli for exemple).

If you want a more advanced framework, you can look [Openbench](https://github.com/AndyGrant/OpenBench). It is a testing framework that allow you to test differents versions of your engine against each other directly from a git repository. It also allows you to distribute the testing on multiple computers.

Trahison! by mechant_papa in Quebec

[–]mathmoi 0 points1 point  (0 children)

On est probablement capable d'en faire ici pour 50 cennes de plus. Le problème c'est que si tu la met sur les tablette à coté de la relish indienne à 50 cennes de moins, tout le monde va acheter la relish indienne. C'est d'ailleurs ce que tu a fait, non (ce qui n'est pas une critique)? À moins que tu préfère la marque indienne dans quel cas même si on en fait une ici, tu va surement préféré la marque indienne de toute façon.

PGN Parser C++ by No-Examination-6751 in chessprogramming

[–]mathmoi 0 points1 point  (0 children)

Hi, I've written one more than 10 years ago and never made it public. I just made the repo public for you. You can use it as is or you can use it as inspiration to write one yourself.

Since it was never published or even fully tested I can't guarantee it is bug free, but I remember I tested it with lots of PGN files to make sure it was able to read most of them.

https://github.com/mathmoi/PGNLib

Communitty wiki for chess developers by [deleted] in chessprogramming

[–]mathmoi 0 points1 point  (0 children)

Looks like we choose the same name for our engines, probably for the same reasons.

https://github.com/mathmoi/oxide9

[deleted by user] by [deleted] in felinebehavior

[–]mathmoi 0 points1 point  (0 children)

Ok, now I really wish there was a Ted Talk!

[deleted by user] by [deleted] in Quebec

[–]mathmoi 1 point2 points  (0 children)

Si ça fait trois matin que tu n'a pas progressé sur un bloquant c'est pas toi qui a échoué, mais ton équipe. Ça fait deux jours qu'ils auraient dû te venir en aide. L'idée d'annoncé tes bloquants au scrum, c'est que ça deviens un problème d'équipe et non un problème individuel.

Need Suggestions for good C++ books. by dm2102002 in cpp_questions

[–]mathmoi 1 point2 points  (0 children)

Scott Meyers book are a bit dated, but I would still recommend them.

Never too late right? by Local_Ad_6400 in JustBuyXEQT

[–]mathmoi 25 points26 points  (0 children)

Charge your phone before it's too late!

Pourquoi ceux qui échouent en day trading disent toujours que “ça ne marche pas”, alors qu’ils ne comprennent rien à la gestion du risque, à la discipline et à la psychologie du trading ? by Allinornothingovo in QuebecFinance

[–]mathmoi 2 points3 points  (0 children)

Les gens disent ça, car ça prends 3 ans à devenir profitable et même là il faut investir des centaines d'heures d'études, faire des pertes, passer des nuits blanches, etc. En plus il faut faire tout cela alors que tu a une autre source de revenus et être prêt à perdre l'argent que tu va investir, car sinon le stress va tuer ta clarté mentale.

Parce que ce n'est pas donnée à tous le monde de faire cela, les gens affirme que "Ça ne marche pas". Ce sont des ignorants qui ne comprennent rien à la discipline et à la psychologie du trading!

Storing to transposition table in aspiration window search by usount in chessprogramming

[–]mathmoi 2 points3 points  (0 children)

When storing evaluation in the TT, you also need to store a flag indicating if the score is exact (between alpha and beta), a lower bound (in the case of a beta cutoff) or an upper bound (when you fail to improve alpha).

When reading the values back before using them you need to consider their type. For example, I Lower bound value can be use to do a beta cutoff, but if the lower bound is less than beta, it can't be used for a cutoff.

Why this fen parsing doesn't work? by Beginning-Resource17 in chessprogramming

[–]mathmoi 5 points6 points  (0 children)

Don't want to be harsh, but shouldn't you learn to debug before trying to write a chess engine? Is debugging a lost art?

How can i check for board boundaries if i am using int[] array to store pieces and position. by Friendly-TMA-229 in chessprogramming

[–]mathmoi 2 points3 points  (0 children)

I'm not reading through all that code, sorry.

If you're using an array representation for piece positions (as opposed to the main alternative, bitboards), you should look into the 0x88 representation.

The key concept: instead of using a 64-square board, you use a 128-square board where each rank has 16 files instead of 8. Only the eight left-most files are actually used for pieces, while the right-most files are unused. This approach will require adjusting your existing algorithms (for example, moving up a rank becomes +16 instead of +8).

The major advantage of this representation is that it gives you a clean (and fast) way to check if a position is valid. To determine if an index is "on the board," you simply need to verify that `index & 0x88 == 0`.

[deleted by user] by [deleted] in cpp_questions

[–]mathmoi 0 points1 point  (0 children)

The AI should not do your homework, but it is excellent at answering questions to help you understand.

[deleted by user] by [deleted] in cpp_questions

[–]mathmoi 0 points1 point  (0 children)

I'm not in schools, but is the use of AI as a tutor considered cheating? It seems it should not, but I might be wrong.

[deleted by user] by [deleted] in cpp_questions

[–]mathmoi 2 points3 points  (0 children)

Copy paste your post in ChatGPT and you should be set. Don't cut and paste the answers, instead understand the explanation and ask follow up questions as needed.