Hacker Newsnew | past | comments | ask | show | jobs | submit | scottmsul's commentslogin

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


Yeah same! I had this essentially same writeup in drafts for my blog, and got distracted by ... factorio ... and never finished it. Glad to see the direction and findings confirmed. Excellent writeup.


> and got distracted by ... factorio ... and never finished it

If the boffin head-space consumed by Factorio never happened, we may have been building factories on distant planets by now.


Sadly, the specter of maintenance is omitted from Factorio, and acts as a limiting factor on automation in the real world...

When all of your factory bits are randomly wearing down, causing speed mismatches and stochastic outright failures, large and complex chains become limited by your ability to run around and diagnose and fix things. Things also tend to fail in novel and unexpected ways; redesigns can help mitigate some failures, while new failures may be introduced. And as reliability improves, you start seeing failures that occur on longer timescales, which more trivial failures would initially mask.


Factorio models stochastic failures as attacks from alien life forms. It fits surprisingly well.


The dynamic between speed and energy was already interesting and counter-intuitive (often you wanted efficiency even though slower, because it greatly reduced POWER needs which could decrease your base size significantly).


An interesting anecdote: I was a big trumpet player in high school, and developed perfect pitch but mainly only for trumpet sounds.


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...


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!


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!


Agree, "largest" base has some pathologies.

Put machine #1 at the starting location, run in one direction, and put machine #2 just before time runs out.

This is going to be a huge factory (as measured by its bounding box) but it's not super interesting.


ahhh another factorio addict :) Curious, how long was your first play through (assuming in v1.x lanching the first rocket)


In FLE, you have access to milestones representing the first time a new entity was created, but coming up with a stratification of rewards for different degrees of automation would be really interesting. Join us!


This is interesting, one of our findings was that the Claude was capable of essential tasks & simple automation (i.e iron gear wheel factory in lab-play) but didn't even try to do it during the "build the biggest factory" game episodes. So the models can do these essential tasks but when given a general goal, i.e "complete the game", they don't have a good level of long-term planning to even try to attempt them. Often they just did un-coordinated small-scale constructs without attempting to scale up existing factories

That was also one of our goals, to find out how do the models act when given a very vague and general objective


The same approach could be used in life


Did you read the page? Because they did give rewards per item produced, and more complex items gave higher rewards.



I just see a bunch of spinning coins forever and nothing happens with no way to stop it...


Same....


> 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?


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.


What about a universal ranked system. For example, take tennis. There are already ranking systems so imagine a single one where all players regardless of gender/age/etc are all on a single list. Competitions will only allow you to play against someone within X rankings from you. So regardless of gender/age/etc, matches will always be reasonably fair and people move up and down based on what they win or lose.

So, now comes the part of whose the best DESC. Want to know the top female, just see the highest ranking one? Top person over 50? Under 20? Top person who isn't taking performance drugs? Top person who is? etc. You can get whatever top ranking you want. All matches are fair. Everyone can play.


This is actually the right answer though. Have one unrestricted category and then run the most popular retarded (I apologize, i can't find a better word, I have tried. It literally means poorer performance because of some specific identifiable physical trait in this case https://www.merriam-webster.com/dictionary/retard#h1) category next (which will often be women but could be men or something else in some instances) Relegate the rest to different events and promote/demote if popularity of some retardation (again, apologies) changes.


> …feels like it defeats the entire purpose from having separate women divisions

Key word: “feels”

That’s on the person/people doing the feeling


> men would win every single time, hands down

I think this is probably broadly true, but not always, maybe not even that commonly. Particularly in sports where raw power and endurance aren't the singular determining factor in the result. I'm optimistic that in some sports, if competition at a high-level started leaning into it, competitor performance from both would eventually converge in a way that makes the divide less clear. Some of those sports, by the nature of reduced exposure, just don't have remotely similar access or exposure among women, which is one of the factors that would change over time.

I'm thinking of climbing, skateboarding, where although speed, power, and endurance are factors, they're sort of relative factors compared to the person's bodyweight and how the routes/courses are set. Skateboard is much more divided for now than climbing as far as I can tell, but climbing is quite a lot closer, and the women's competition is generally more interesting to me to watch.

I feel like people aren't thinking enough about how much time each generation of new competitors has in terms of exposure to high-level athletes from the previous cohort, and how much of a compounding effect that can have. If you're clearly someone who'd be in the female category of sport, and you're divided into that category from the day you start, and the selection of people from the previous generation is 10% of the amount available among the other category, there's a very limited surface area for pushing harder.

In skateboarding, this pretty much meant anyone coming up 10 years ago had basically 2-5 notable figures who made anything of themselves skateboarding, and maybe half of them either stopped doing the sport or became reclusive. Ideally, you need to skate with the boys and compete with yourself and any other girl you can find. This period of time produced exactly what you'd expect; more women than in the previous generation got at least 50-75% better than the top competitors they would have looked up to. This compounds, and now those women are the inspiration for the current cohort, but they're only ever going to get as good or a bit better whichever rare individuals they have to compete with. Big fish, small pond.

In my opinion, we don't yet know how close those can get, and in some cases I'd like to see how that could change. In others, that possibility doesn't really come down to how driven or creative someone is, there's limited surface area for optimization and muscle growth, a clear dividing line where only mutant abnormalities would clear the gap at the highest level, since everyone on either side are already mutants.


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.


Sinusoids are also special because they are eigenfunctions of the derivative operator.

The physics result is actually probably a consequence of that.

At the end of the day the whole lesson of modern math is that its useful to view things from many perspectives.


Excellent point, lots and lots and lots and lots of physical objects are harmonic oscillators. That does have pretty fundamental grounding in physics.

I can think of lots of other places I'd use fourier analysis (at least qualitatively as with doing diffusion modeling in my head) but you're right that sinusoids are more physically "real" whereas being possible to represent in any basis set is more "valid" if that makes any sense.

Not quite sure what the right word is on this one, but I agree "real" kind of suggests real oscillators underlying the phenomena. Square waves are less physical because of discontinuities in both the signal and derivative; nature really doesn't care for discontinuities.


Frequency domain also makes the math really easy for linear, time-invariant operations, which (approximately) describe a lot of systems that exist in nature.

The Gibbs phenomenon, for example, falls out naturally from the IFT of a frequency response where all the frequencies above some cutoff are zero.

I'm curious how the square wave frequency domain would describe the Gibbs phenomenon -- I think you'd have harmonics of the fundamental square frequency showing up as if the system were nonlinear.


Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: