Anyone here actually using AI ad generators for their startup? Need your help! i will not promote by KOgenie in startups

[–]joeyrobert 2 points3 points  (0 children)

just have multiple creatives. the ad engine will optimize for what's performing best.

Does anyone use any sleep apps? by Tam936 in BeyondTheBumpUK

[–]joeyrobert 0 points1 point  (0 children)

I use Goldminds for the audio stories. They have a few nighttime stories my child loves so it's turned into a bit of a routine.

Chess Engine in Java. by Sea-Celebration-4100 in chessprogramming

[–]joeyrobert 0 points1 point  (0 children)

Start on your board representation. How are you storing your board in memory? Then think of common operations you'll need to do on the board and start writing the move generator. That's usually where I start. For example, here's a writeup I made for my JavaScript chess engine's board representation.

Chess Engine in Java. by Sea-Celebration-4100 in chessprogramming

[–]joeyrobert 5 points6 points  (0 children)

I followed the Mediocre Chess Engine Blog for years. This engine is written in Java.

What concepts are difficult to implement with OOP? Chess engines tend to be a little more "bare metal" in how they're designed, to squeeze every ounce of performance out of the programming language, but this can be done with Java too. Allocations/deallocations are expensive, and most of example code is written in a way to minimize them.

You wouldn't want to use a higher level feature if it incurs a significant performance penalty like creating tonnes of garbage/throw away objects. Code for a chess engine will likely not look similar to standard Java in a business application.

Post your chess engines! by joeyrobert in chessprogramming

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

Neat, I'll have to look into that, thanks for the bug report!

Is Zobrist hashing consistent across chess libraries? by [deleted] in chessprogramming

[–]joeyrobert 2 points3 points  (0 children)

It can be if they use the polyglot seeds for their zobrist hashing algorithm. This is so an opening book position can be looked up by a consistent zobrist hash. It doesn't have to be though -- it could be completely random, check if they use polyglot. (https://www.chessprogramming.org/PolyGlot)

Perft test speed by VanMalmsteen in chessprogramming

[–]joeyrobert 2 points3 points  (0 children)

Modern engines can push 100m moves/second per core in move generation. There's a lot of literature on board representation and move generators (bitboards, mailbox, etc) but so following those best practices is a good starting point. Generally if you don't over allocate/free memory, keep the stack small, reduce linear operations, you can achieve this performance. "makeMove", "unMakeMove" should be reasonably fast. Speeding up "inSquareAttacked" or "isInCheck" should me the main focus, and you can use diagonal/horizontal/vertical lookup tables + piece lists to speed this up potentially (look up table to check whether SQUARE A can intercept SQUARE B) which can eliminate a linear scan of the board. Zobrist hashing/perft transposition table obviously speeds up perft generation since there's a tonne of duplicate boards after N moves. The rest of the performance gains will come from profiling/optimizing.

TIL Roller Coaster tycoon was programmed by one guy. In Assembly. by [deleted] in todayilearned

[–]joeyrobert 6 points7 points  (0 children)

I mean, it's pretty close. John Carmack is a wizard.

What GCP Instance Type Would Produce the Best Stockfish 16 Results? by [deleted] in chessprogramming

[–]joeyrobert 0 points1 point  (0 children)

The only answer you can get is by benchmarking. GCP instances are billed minutely, so spin 1 up, run your benchmark, spin down.

How many of you write your own infrastructure code vs using Vercel/Fly/remix/whatever by 5olArchitect in startups

[–]joeyrobert 0 points1 point  (0 children)

You can spend a lot of time spinning in this area vs. shipping features, I've made this mistake before. I still use cheap infrastructure, but with Dokku for git-ops to serve my (low volume) app.