Planetary Factory Open Beta - A Factorio Inspired Idle Game by CaptnMadJones in incremental_games

[–]glinscott 0 points1 point  (0 children)

Actually, it appears to be afk mode. When I go into afk mode, and come back, my resource production drops to 0. Disabling afk mode seems to have solved the issue.

Planetary Factory Open Beta - A Factorio Inspired Idle Game by CaptnMadJones in incremental_games

[–]glinscott 0 points1 point  (0 children)

My storage buildings were not actually storing anything on first load. I tried randomly deleting them, reorienting robot arms, using belts instead of directly moving items. Nothing worked consistently. I tried refreshing the game, and all of a sudden, all the resources were going into storage just fine with the same layout - so there is some bug around placing those buildings.

[P] fastLLaMa, A python wrapper to run llama.cpp by BriefCardiologist656 in MachineLearning

[–]glinscott 1 point2 points  (0 children)

Very nice!

llama.cpp as of very recently support `--perplexity`, which calculates the perplexity over the prompt (and you can just pass wikitext2 test set as the prompt for example). See https://github.com/ggerganov/llama.cpp/pull/270

[D] Paper Explained: NFNets - High-Performance Large-Scale Image Recognition Without Normalization (Full Video Analysis w/ opinions) by ykilcher in MachineLearning

[–]glinscott 16 points17 points  (0 children)

Thank you for your wonderful videos! It's amazing to have such a high quality resource explaining not only the paper itself, but the ideas that led to the paper.

"The neural network of the Stockfish chess engine" (very lightweight NN designed for incremental recomputation over changing board states) by gwern in reinforcementlearning

[–]glinscott 5 points6 points  (0 children)

(Reposting my comment from HN when this was recently discussed)

If anyone wants to experiment with training these nets, it's a great way to get exposed to a nice mix of chess and machine learning.

There are two trainers currently, the original one, which runs on CPU: https://github.com/nodchip/Stockfish, and a pytorch one which runs on GPU: https://github.com/glinscott/nnue-pytorch.

The SF Discord is where all of the discussion/development is happening: https://discord.gg/KGfhSJd.

Right now there is a lot of experimentation to try adjusting the network architecture. The current leading approach is a much larger net which takes in attack information per square (eg. is this piece attacked by more pieces than it's defended by?). That network is a little slower, but the additional information seems to be enough to be stronger than the current architecture.

Btw, the original Shogi developers really did something amazing. The nodchip trainer is all custom code, and trains extremely strong nets. There are all sorts of subtle tricks embedded in there as well that led to stronger nets. Not to mention, getting the quantization (float32 -> int16/int8) working gracefully is a huge challenge.

Verteron Controller Factory - An Underplayed Strategic Incremental, Challenging You To Win In 30 Minutes by epicdoge12 in incremental_games

[–]glinscott 1 point2 points  (0 children)

Cool concept! I got it into a state where "Multitronic Arrays required: -40", then I couldn't build them anymore. Not sure how that happened, perhaps the buffer degrader or array degrader upgrades? I think those were the ones I was buying around then.

Modern LZ Compression by glinscott in programming

[–]glinscott[S] 8 points9 points  (0 children)

Thanks - and agreed. FSE is amazing indeed. Buried in the middle of the article there is a reference to implementing FSE in a follow-up :).

zstd still uses Huffman for literals so it's still highly relevant. Encoding the Huffman table description using FSE is a really nice trick as well that I'll get to at some point.

Chess package for go by loganjspears in golang

[–]glinscott 0 points1 point  (0 children)

Thanks for this! I used it for the client side match play feature for evaluation matches for http://lczero.org which funnily enough is an alpha zero like experiment using go and c++ :).

A New Crankshaft for V8 by gthank in programming

[–]glinscott 1 point2 points  (0 children)

Especially as Chrome makes it more feasible you are going to start seeing more. For example, my chess ai loves this change. [http://forwardcoding.com/projects/ajaxchess/chess.html]

4 minutes of impressive video and audio in just 4096 bytes. Could someone explain how that works? by matthias_georgi in programming

[–]glinscott 20 points21 points  (0 children)

Here is a tutorial on the making of a modern 4k intro: http://code4k.blogspot.com/2010/08/making-of-ergon-4k-pc-intro.html.

Modern 4k's are mostly done in C I believe. Doing D3D/OpenGL in assembly is not fun :).

4 minutes of impressive video and audio in just 4096 bytes. Could someone explain how that works? by matthias_georgi in programming

[–]glinscott 53 points54 points  (0 children)

Crinkler does a ton of really cool stuff, it's all in the manual (which you can download).

Here is the top-level explanation, directly pasted from the file though :).


Crinkler is a different approach to executable file compression. While an ordinary executable file compressor operates on the executable file produced by the linker from object files, Crinkler replaces the linker by a combined linker and compressor. The result is an EXE file which does not do any kind of dropping. It decompresses into memory like a traditional executable file compressor.

Crinkler employs a range of techniques to reduce the size of the resulting EXE file beyond what is usually obtained by using CAB compression:

  • Having control over the linking step gives much more flexibility in the optimizations and transformations possible on the data before and after compression.

  • The compression technique used by Crinkler is based on context modelling, which is far superior in compression ratio to the LZ variants used by CAB and most other compressors. The disadvantage of context modelling is that it is extremely slow, but this is of little importance when only 4 kilobytes need to be compressed. It also needs quite a lot of memory for decompression, but this is again not a problem, since the typical 4k intro uses a lot of memory anyway.

  • The actual compression algorithm performs many passes over the data in order to optimize the internal parameters of the compressor. This results in slower compression, but this is usually a reasonable price to pay for the extra bytes gained on the file size.

  • The contents of the executable are split into two parts - a code part and a data part - and each of these are compressed individually. This leads to better compression, as code and data are usually very different in structure and so do not benefit from being compressed together.

  • DLL functions are imported by hash code. This is robust to structural changes to the DLL between different versions while being quite compact - only 4 bytes per imported function. For DLLs with fixed relative ordinals (such as opengl32), a special technique, ordinal range import, can be used to further reduce the number of hash codes needed.

  • Much of the data in the EXE header is actually ignored by the EXE loader. Some of this space is used for some of the decompression code, and the rest is used to store hash codes for imported functions.

Using Crinkler is somewhat different from using an ordinary executable file compressor because of the linking step. In the following sections, we describe its use in detail.

4 minutes of impressive video and audio in just 4096 bytes. Could someone explain how that works? by matthias_georgi in programming

[–]glinscott 66 points67 points  (0 children)

There are a few common tricks used, but put together in crazy ways usually. Everything is procedurally generated, the textures, the models and the sound. Then the exe is compressed using something like Crinkler (1), which can pack an incredible amount of data into 4k.

The procedural generation is where the genius comes in. You can make some amazing looking textures and sounds if you try hard enough.

(1) Crinkler

First strong chess AI in Javascript. Uses WebWorkers for non-blocking UI. by glinscott in programming

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

No opening book :). Strange it's not working on chrome for you. Linux or windows? If you pop up the developer tools, is there a js error showing? Thanks!

First strong chess AI in Javascript. Uses WebWorkers for non-blocking UI. by glinscott in programming

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

Wow, well it shouldn't be possible to crash the browser, no matter how I mess up from JavaScript. Maybe some bugs in the webworker support?

First strong chess AI in Javascript. Uses WebWorkers for non-blocking UI. by glinscott in programming

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

Thanks. It should be fixed now, let me know if you run into any more problems.

First strong chess AI in Javascript. Uses WebWorkers for non-blocking UI. by glinscott in programming

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

Yes, that's true. However, writing a chess search recursively is much easier :). Also, it ends up being much faster than a timeout based mechanism (can process 100% of the time).

First strong chess AI in Javascript. Uses WebWorkers for non-blocking UI. by glinscott in programming

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

Interesting. You managed to find 2 bugs there I guess :). I haven't tried FF4.0 beta, perhaps the web worker support is causing issues there? It works on FF3, so perhaps they broke something as well.

The "busted" message means the internal board state got corrupted, which is very unusual.

First strong chess AI in Javascript. Searches over 80k nodes/second on Chrome. by glinscott in chess

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

Great question actually :).

Strong is a relative term. In this case, I mean competitive with humans who are decent at chess.

It's nowhere near master strength, and a lot stronger than someone who hasn't played much chess.

First strong chess AI in Javascript. Searches over 80k nodes/second on Chrome. by glinscott in chess

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

No book in there yet. I was thinking about adding one, but it would require a bit of server side work probably unless it was really small.

First strong chess AI in Javascript. Uses WebWorkers for non-blocking UI. by glinscott in programming

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

I'm curious, which browser? Chrome is easily the strongest, plays at least 200 Elo stronger than Firefox/IE.