News for hackers. Stuff that matters.

scottmsul

Re:Solving Factorio Quality on Wednesday September 30, 2026 @09:27AM (#49908649)
Oh boy, this is a rabbit hole I've gone down pretty hard as well. I made a python script and a separate js app for running linear solvers on the upcycling problem. I really like the author's exposition for how to setup the solve matrix, as it's the first step when understanding the quality math.

Speaking very high level, probably the most interesting and counter-intuitive thing I learned from doing these projects is that adding just a touch of speed modules can go a long way, especially at the lower quality levels. Of course, if the only thing being optimized is legendary outputs per common input, then speed is always bad. But because an upcycler works much better when the buildings and modules are themselves legendary, usually the limiting factor is the (very expensive) crafting machines, rather than the amount of input lines. Adding a touch of speed can give way more throughput for the same number of legendary crafting machines, at the cost of some wasted inputs, which isn't a big deal when you can slap down a few more cheap miners.

Python script: https://github.com/scottmsul/FactorioQualityOptimizer

JS source: https://github.com/scottmsul/upcycle

JS app: https://scottmsul.github.io/upcycle

Re:Show HN: Teach your kids absolute (perfect) pitch on Monday June 22, 2026 @09:34AM (#48629917)
An interesting anecdote: I was a big trumpet player in high school, and developed perfect pitch but mainly only for trumpet sounds.
Re:Sycophancy in GPT-4o on Wednesday April 30, 2025 @09:24AM (#43844891)
Or you could, you know, let people have access to the base model and engineer their own system prompts? Instead of us hoping you tweak the only allowed prompt to something everyone likes?

So much for "open" AI...

Also I should add, being a Factorio veteran with 2-3k hours in this game, I think the goal of making the "largest possible factory" is too vague and not the right metric. When Factorio players make large megabases, they don't go for "size" per se, but rather science research per minute. The metric you should be telling the agents is SPM, not "largest" base!
There was a HN post here not too long ago about a team that used reinforcement learning to train an agent to beat pokemon red. They mentioned how they had to tweak the cost function to give small rewards for exploring and big rewards for completing "essential tasks" like beating gyms.

I wonder if this same approach could be used here in factorio? Using the pokemon red analogy the main "essential tasks" in Factorio are setting up automation for new items and new science packs. I think a good reward function could involve small rewards functions for production rates of each item/sec, medium rewards for setting up automation for new items, and big rewards for automating each new science pack.

Telling a Factorio agent to just "make a big factory" is like telling a pokemon red agent to just "beat the game", it has to be broken down into smaller steps with a very carefully tuned reward function.

Thinking about this is really making me want to jump into this project!

Re:A password generator inspired by the Xkcd password spec on Thursday February 20, 2025 @09:23AM (#43114975)
Re:Show HN: Play with real quantum physics in your browser on Friday February 07, 2025 @09:59AM (#42973349)
I just see a bunch of spinning coins forever and nothing happens with no way to stop it...
Re:The bunkbed conjecture is false on Thursday October 03, 2024 @09:02AM (#41730404)
> if you have a path in the upper bunk that gets broken you are screwed

Counter-factuals like this don't apply when talking about average probabilities. If you cross over, it's an identical graph with identical probabilities. idk, to me it seems really counter-intuitive that the opposite bunk's node would be easier to get to than the current bunk's node.

Suppose all the groceries raised the price of item X by exactly the same percent Y on the same day. At first glance this would look like perfect collusion in the data. But how do you know it wasn't just the supplier price going up by Y percent?
Re:What do scientists tell us about boxing's gender row? on Friday August 09, 2024 @10:00AM (#41201917)
Suppose we took this line of thinking to its natural conclusion. If we wanted to be completely neutral, in theory we could have no male/female division at all, and just compete for the "best human" in each sport. But because of the vast biological differences between men and women, men would win every single time, hands down. This goes back to why do we have men and women divisions in the first place? Because we want a space for people without the vast advantages from male physiology to compete fairly with each other. Allowing for people who are technically "women" based on their reproductive anatomy, but have all the male physiological advantages otherwise, feels like it defeats the entire purpose from having separate women divisions.
Re:Is the frequency domain a real place? on Sunday April 07, 2024 @08:47AM (#39960389)
Except sinusoids are special in that they are natural solutions to the Helmholtz wave equation. There's other problems too like square waves having infinite energy. This article might make sense to a mathematician or computer scientist but neglects the underlying physics of sound and waves.
Re:Show HN: Refractify: optical software against Myopia on Friday February 23, 2024 @08:07PM (#39488150)
Congrats!

For anyone who's interested, there's a group of us dedicated to natural myopia reduction at reducedlens.org, which is a free and open-source fork of endmyopia. I've even started measuring my axial length to try and get better data on if this stuff actually works (only one measurement so far though, so nothing interesting yet).

The nature paper was pretty crazy. Basically because blue bends more than red (think of a prism), it also focuses a bit sooner. This phenomenon is known as longitudinal chromatic aberration, or LCA for short. This means if you're myopic, blue might be more blurry than red, and vice-versa if you're hyperopic. The researchers in the nature paper had participants watch a movie where they straight-up blurred the blue or red with software, in order to produce fake LCA signals. They found the participants axial lengths still shortened or lengthened anyway in response.

But why would it be a dodecahedron and not just a metal plate with a hole in it? Seems overkill.
Having given my brother a Tungsten cube once for Christmas, it's possible they just made these because they were fun and looked cool.
Re:Worldcoin isn’t as bad as it sounds: It’s worse on Friday July 28, 2023 @11:01AM (#36907775)
I'd be curious to see if someone could use generative AI to make fake irises and scam the handout mechanism
Re:Is GitHub Down? on Saturday June 17, 2023 @11:20AM (#36370970)
I'm in Florida so it must be pretty major.
Re:Is GitHub Down? on Saturday June 17, 2023 @10:59AM (#36370758)
Interesting, I didn't think to try mobile, that actually works for me too. Twitter seems to be fine for me on both mobile and desktop.

Edit: actually seems like twitter isn't refreshing with any new data on desktop

Re:What Is Temperature in NLP? on Monday March 13, 2023 @11:01PM (#35146839)
The two-state system was the first example I learned in undergrad stat mech, and really helped me understand the first-principles definitions of entropy, temperature, etc. My parent comment was more for the casual HN reader, but if you really dig into the two state system, negative temperatures aren't all that weird.

The first thing to understand is microstates, which is just the number of ways a system can have a certain energy. Eg in a two-state system with ten particles and energies +/-(E/2), there's one microstate where the energy is -5E (all negative), ten states with -4E (one elevated), etc. Then entropy is just the log of the # of microstates, which is much easier to deal with, since microstates tend to behave exponentially. Eg entropy(E=-10) is log(1)=0, entropy(E=-9) is log(10), etc.

Then temperature like you said is d(entropy) / d(energy). Two systems with different temps brought into contact will exchange energy until the temps are equal, since this configuration maximizes entropy.

The two-state system can have negative temperatures since entropy starts decreasing with energy once more than half of them are in the higher-energy state. This can't happen in more familiar scenarios (eg ideal gas, blackbody, etc) since usually entropy always goes up with energy.

Re:What Is Temperature in NLP? on Monday March 13, 2023 @09:52AM (#35135714)
Everyone here seems totally lost on the physics connection. Suppose you have a box of atoms, each atom can be in one of two states, a low energy E1 and a high energy E2. If the box has a temperature T, then the probability that any atom is in state E1 is e^(-E1/kT) / [ e^(-E1/kT) + e^(-E2/kT) ], and similar for E2. As you lower the temperature most of the atoms gravitate towards the lower energy state E1, and as you raise the temperature they gravitate towards a 50/50 mix of E1 and E2.
Re:Show HN: Sudoku with 0 Bells or Whistles on Wednesday February 01, 2023 @03:47PM (#34617469)
Also the novel rulesets make it so much more interesting than vanilla sudoku. Oftentimes the puzzles have really abstract/mathematical/beautiful break-ins. Definitely adds a lot of variety and replayability.
Re:What Is Our Universe Expanding Into? on Tuesday January 17, 2023 @04:29PM (#34419520)
In general relativity space-time is a 4-dimensional (3 space + 1 time) surface that itself can expand, contract, or move around. It's perfectly reasonable in GR to have a distance be L at time t, then L+dL at time t+dt. No extra spatial dimensions needed.
Re:What Is Our Universe Expanding Into? on Tuesday January 17, 2023 @04:13PM (#34419252)
There was a point in time where everything in the visible universe was the size of a potato, but the entire universe (beyond the visible edge) is most likely just more matter in every direction indefinitely.

Because the universe follows general relativity, space itself behaves like a fluid. When the universe "expands", that's just space itself growing bigger over time.

Re:What Is Our Universe Expanding Into? on Tuesday January 17, 2023 @03:52PM (#34418879)
I would add the connection to GR. In a Newtonian world, there would be nowhere for matter to expand into, and our intuition would be correct. But in General Relativity, space itself can grow or shrink like a fluid.
Re:The Zen Anti-Interpretation of Quantum Mechanics (2021) on Tuesday December 27, 2022 @06:58PM (#34155611)
Something that's always bothered me about many-worlds is that it states the number of worlds should always be increasing exponentially. Which means from an anthropic point of view, the most likely time to be born is the last ever human, with insanely exponential odds. But many people have been born in my lifetime, ergo many-worlds seems unlikely.
Re:The Child Is the Teacher: A Life of Maria Montessori on Friday December 09, 2022 @09:55AM (#33921831)
When I was 5 my parents put me in a "normal" kindergarten, where I failed to do literally anything - I wouldn't make any marks on any of the sheets, not even my name. They were worried I had some kind of developmental problem.

Somewhat out of desperation they put me in a Montessori school. By the end of Kindergarten I was reading at a 3rd grade level and understood the basics of multiplication.

We ended up moving by 1st grade and I went back to "normal school", where I did ok since I already knew everything.

Re:There’s No Algorithms on Monday November 21, 2022 @03:38PM (#33697618)
I'm guessing he means there's no algorithms that decide what you see and what you don't, you just see everything from everyone you follow. But I don't use Tumblr so I'm not 100% sure.
Re:Factorio for Nintendo Switch is now available on Friday October 28, 2022 @11:50AM (#33373004)
I'm about 200 hours into a Space Exploration game with some friends, and we just started building spaceships! One thing I really like about this mod is that it forces you to properly learn the circuit network, I never really used it in the base game but it's an absolute must for interplanetary logistics.
Re:CMSC 430: Design and Implementation of Programming Languages on Wednesday October 05, 2022 @12:51PM (#33098012)
I took this exact class exactly one decade ago (Fall 2012) when it was taught by Jeff Foster! One of my all-time favorite classes. The main language used was OCaml, and we ended the course by writing a compiler for a made-up minimalistic OOP language.

Funny story, I mixed up the due dates for one of the projects and didn't realize the correct date until the day before. Somehow I managed to do the entire project in one sitting, working from about 3pm-midnight. I basically took over an unused room in the math building and scribbled all over the chalkboards until I internalized everything, then the coding wasn't too bad. I even remember ordering DP Dough about halfway through, those were the days haha.

OCaml was one of those languages where I would stare at the problem for an hour, then realize the solution in a sudden epiphany, and it would only require a couple lines of code.

Re:Factorio is coming to Nintendo Switch on Tuesday September 13, 2022 @12:27PM (#32826471)
It's unfortunate there's no mod support. As someone with over 2000 hours, for me it's really the overhaul mods that give the game endless variety and replayability. Might not be a bad idea to make certain overhaul mods available anyway, even if it involves hard-coding them in.

Older »