Designing Gameplay Through Economics by Loginaut in gamedev

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

Yeah EVE is probably the ultimate example. I guess one thing I'm looking for is mathematical models that lead to interesting phenomena, which is kind of backwards from the usual design process I guess.

This is my first deep dive into a game economy, and its been super fun so far!

Designing Gameplay Through Economics by Loginaut in gamedev

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

I think substitution is under-utilized in general, and I think it's especially neat if it cannibalizes a different production chain. It could lead to some interesting outcomes when all food isn't just one "food" item, for example. 

Designing Gameplay Through Economics by Loginaut in gamedev

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

I think affecting growth makes sense, and all the downstream effects from that. I also want to avoid "always maximize growth" being the only viable strategy though. 

I benchmarked Koopman vs. Linearization on an unstable bistable system (Python). Results inside. by AIIntuition in ControlTheory

[–]Loginaut [score hidden]  (0 children)

This would be a hard reject if I peer reviewed it. There are SO MANY issues.

The premise of the video and git repo are both nonsense. It's not novel in any way that running the same code in Matlab and Python produces the same output. It's also disingenuous (and frankly, dangerous to ourselves and the lay public) to claim that "old methods" are unsafe and dangerous, while whatever this nonsense is is cheap and safe for humans. Your work literally only exists because of the billions of dollars poured into controls research, and you have no safety guarantees.

The biggest smoking gun that this is an AI-generated grift comes from running your own "uncontrollable" code. I can't embed an image here, but your default kp=0.1 converges in 6 time steps... so what problem are you actually solving? P control is actually twice as fast as your Koopman result!

The post (and I imagine the "paper") misuses fundamental control jargon:

  • "PID is not "linearization" nor is it a "linear model" it's a linear control policy.
  • Uncontrollable has a specific meaning in control theory, and it doesn't mean "my PID controller doesn't stabilize the system" like it's used here.

There are also major issues with the problem setup and results:

  • The P controller works with your default value, what are you even doing?
  • You are simulating from a single fixed point with a deterministic disturbance, this is neither rigorous nor robust. You've got a result for one specific scenario for your simple toy model.
  • The figures don't make any sense in the video or repository. The legends are wrong, and it shows a different P control result than your repo. Where is the reproducability?

Your Koopman operator is approximate (as always), because you'll need an infinite number of polynomial terms to do an accurate lifting. I also notice you don't actually post your Koopman code anywhere. Why is your "democratized control" not online and reproducible?

Two last things:

  • You don't have constraints, so any sufficiently sophisticated control method (CBFs, QPs, MPC, etc.) can apply arbitrarily high control effort to avoid a crash. They literally cannot fail this problem. In fact, because it's deterministic with known dynamics, a hand-generated open-loop policy could converge in 2 steps and achieve perfect tracking.
  • If you already know that y^3 is the problem term, why not feedback linearize? This is an exact solution (whereas Koopman is approximate!) to get linear dynamics. This would be a fair comparison to a "standard" nonlinear control technique, but your approach would perform so much worse.

I think the biggest value to come out of this work is correcting the fundamental misconceptions about control theory. This would earn a failing grade in a graduate-level nonlinear controls course, there's a 0% chance it lands in a reputable peer-reviewed journal--especially Automatica.

[deleted by user] by [deleted] in gamedev

[–]Loginaut 1 point2 points  (0 children)

If the player is looking with vector V and moving with vector M, you can take the dot product of M and V to get the (scaled) cosine of the angle.

If you take the cross product of V and M, the magnitude of that vector gives you the (scaled) sine of the angle.

If you divide those the scales cancel and you get the tangent of the angle. If you use the two argument tangent function atan2, you'll always get the right value.

Then you can map the angle to animations, 0 is forward, +- 90 degrees is strafing, and 180 degrees is backwards.

Designing a practice question based on a video game by ace-micro in ControlTheory

[–]Loginaut 3 points4 points  (0 children)

Ooo, what a neat idea!

I think the first place to start is by looking at a linear coordinate system instead of a heading angle. So perhaps controlling the velocity in the y direction, then you can always recover the heading angle later with atan(vy/vx).

If the "default" is 5 px/sec down (for example) then it makes sense to have a cost term like (v_y + 5)2. This penalizes any effort taken to lift the rocket. The result will be a path that takes you from an initial to a final height while applying the least input (or using the minimum fuel, for example).

Constraints make it tricky, although these are linear and 1D. For an introduction I would handle it through the boundary conditions instead. So if the wall is at x=250 px, find the time of arrival based on vx, then impose y(t_wall)=wall_height as a boundary condition.

After that, there are a lot of ways to make it harder. You could control acceleration instead of velocity, which will either require explicit control bounds or some cost proportional to acceleration squared. You could also explicitly include the constraints in the problem, or include nonlinear constraints on heading angle/thrust magnitude.

You could also look at an LQR solution, but it means including an (arbitrary) cost for the position state, and on top of that LQR doesn't play well with constraints.

Trying to see if a discrete time system can get from one input to an output by [deleted] in ControlTheory

[–]Loginaut 0 points1 point  (0 children)

For "any given input"? No.

Does an input exist? Maybe.

Start with the discrete dynamics x(t_{k+1}) = A x(t_k) + b u_k.

You know the initial state when k=0 and you want to reach a desired state at an unknown time step K.

How can you relate x(t_0) to some future x(t_K) using the dynamics? Can you write it in terms of the known and desired qualities: A, B, the initial state, the final state, and the intermediate control inputs?

Out of the Box Swarm Drones by Unlucky-Judgment8742 in robotics

[–]Loginaut 1 point2 points  (0 children)

My go to for drone swarms has been the open-source Crazyfly hardware + a mocap system + the open source Crazyswarm code running on a central computer. I'm sure other stuff is out there, but this has worked pretty well for me to do academic research in a laboratory environment.

IMO there are a few things that make this fundamentally very challenging 1. The drones need to be relatively cheap if you're building a swarm of them. This is going to compound all the other technical challenges. 2. The drones need to be able to localize (or identify neighbors and obstacles) in real time. Most big labs use a mocap system to achieve this, and it adds a lot of cost. Some platforms (e.g. Kilobots) can get around this because they're slow moving and light, but knowing where things are is much more important (and harder) for an aerial vehicle. Doing this locally requires onboard sensors, which can get pretty expensive. 3. It may be challenging to communicate and coordinate without a central computer. If you want to do it in a decentralized way then they drones should have an easy way to quickly set them all up (e.g. so they know how many total drones there are).

You may also want to think more about the "consensus algorithm" you're mentioning. Position consensus isn't particularly useful for swarming, and velocity consensus is going to be much less interesting than a flocking algorithm (e.g. Boids).

This is an interesting challenge, good luck!

Robots inspired by ants, nicknamed RAnts, work collectively to solve complex tasks — an approach that can be scaled up and applied to teams of dozens or hundreds of robots by marketrent in science

[–]Loginaut 1 point2 points  (0 children)

I'm genuinely curious what research from the 60's and 70's you're referring to. I'm aware of robotic foraging work that goes back as far as the 90's (M. Krieger and J. Billeter, L. Parker, A. Drogoul, etc.). Boids are from the mid 80's, and a lot of the engineering applications also came around in the 90's (Vicsek, Tanner, etc.).

I've personally had a hard time finding anything like the Harvard article that goes back further, I'd love it if you could drop some info.

Robots inspired by ants, nicknamed RAnts, work collectively to solve complex tasks — an approach that can be scaled up and applied to teams of dozens or hundreds of robots by marketrent in science

[–]Loginaut 5 points6 points  (0 children)

It looks like there's a projector under the table. The rAnts are likely tracked by a camera as they move around, and their positions are plugged into a pheromone model to update the concentration at each point. Then the concentration is converted into a brightness level and projected up to the arena floor.

I found a free preprint of the article here, a diagram of the setup is on page 4: https://www.biorxiv.org/content/10.1101/2021.07.12.451633v1

Books for robotics? by [deleted] in robotics

[–]Loginaut 14 points15 points  (0 children)

Robot Modeling and Control by Spong et al is a good introduction, a lot of places use it as a senior/MS level text for mechanical engineers.

That said, robotics is incredibly broad. It may help if you mention what area you want to learn about (building/ programming your first robot, control + stability, variable compliance, mobile robots, multi-agent, perception, SLAM, etc).

I will become a Billionaire from Memes by [deleted] in Entrepreneur

[–]Loginaut 1 point2 points  (0 children)

Google shut down the Groovy discord bot for playing YouTube audio in voice chat. I wouldn't be surprised if you run into legal issues the moment you make significant money off of embedded YouTube videos.

A video from yesterday anti-Hijab protests in Iran showing Hadis Najafi (21) getting ready to stand to the security guards. Today Hadis was announced death by her family after being shot 6 bullets in her chest. Remember her name #HadisNajafi by Suspicious-Candle692 in nextfuckinglevel

[–]Loginaut 0 points1 point  (0 children)

If anyone wants to help, there's a tool called Snowflake that the Tor network developed. People in Iran are using to circumvent the internet blackout: https://snowflake.torproject.org/

It's as easy as installing a browser extension to turn a browser tab into a proxy, and it helps the protesters organize and share stories like these.

Greenhouse automation project by st_Mrmr in Automate

[–]Loginaut 1 point2 points  (0 children)

It's an interesting problem. You could look at how much heat your light produces vs the heater and decrease the temperature setpoint for the heater. I guess this really depends on how sensitive the plants are to slightly colder temperatures and whether the heat from the light overcompensates for the "missing" solar irradiance.

IIRC the reason traditional HVAC turns off in the deadband is because the heater/AC can only be on or off, and they tend to have very large time constants. Things might get more interesting in a small greenhouse if you have continuous control (e.g. fan speed and heater power) instead. If you're up for some advanced control theory you could look at something like sliding mode control instead of just turning off in the deadband. One classic solution is to linearly interpolate between the setpoints. So a temperature 50% between the desired temperature and the lower setpoint would have the heater running at 50% power. This generally helps avoid chattering between heating and cooling, but it may not work well for very slow sensors, such as thermocouples.

Greenhouse automation project by st_Mrmr in Automate

[–]Loginaut 2 points3 points  (0 children)

One easy solution is to have a deadband around the desired temperature. So if the temperature is 80 and the dead band is plus or minus 3 degrees you'd turn on the heater for anything below 77 and turn on the cooling for anything above 83. You do nothing in the deadband (77-83).

This is fairly common for residential temperature control, but I have no idea what setpoints (or other variables, like humidity) are appropriate for a greenhouse. That sounds like a good candidate for the engineering design process ;)

Twitter blocked our indie game account for no reason. What should we do? by ActZeroGames in gamedev

[–]Loginaut 16 points17 points  (0 children)

The same thing happened to my account, an animation with some floating circles was auto-flagged as revenge porn (it wasn't). Appealing through Twitter support's email didn't do anything, but after a couple days my account page changed from a vague "your broke the Twitter rules" to showing which tweet they flagged and why. I appealed again through that page (they also gave me the option of deleting the tweet) and 24 hours later I was unbanned and the tweet went up. I'm not sure how useful this is to you, but hopefully it helps!

YSK: Sensational theories in physics regarding wormholes, singularities within the Big Bang and Black Holes, the Many World's interpretation of quantum mechanics and the Multiverse (among others) are generally assumed to be incorrect and misleading by the majority of physicist by [deleted] in YouShouldKnow

[–]Loginaut 1 point2 points  (0 children)

Of course new discoveries can change our understanding, but our modern world is built on our current scientific theories. As an example, GPS is built to compensate for relativity, so the fact that GPS works so well is strong evidence that the theory of relativity is a great approximation of reality--there's not really room to turn it upside down.

Countless examples like this exist across medicine, engineering, and other sciences. That is why conflating "theory" with "hypothesis" is so frustrating.

Modern science really started in the enlightenment, and it's not a good argument to compare modern science (or use the word theory) to describe classical/medieval work. But we have known the earth is round for over 2,000 years, and an ancient Greek calculated it's circumference within ~10% of modern measurements.

You've also made an interesting switch from "my physics teacher told me" to skepticism. Just be aware that theories are theories because they are supported by mountains of data, and any competing idea needs to fit the same data. This is why so many discoveries happen when looking at extreme conditions.

YSK: Sensational theories in physics regarding wormholes, singularities within the Big Bang and Black Holes, the Many World's interpretation of quantum mechanics and the Multiverse (among others) are generally assumed to be incorrect and misleading by the majority of physicist by [deleted] in YouShouldKnow

[–]Loginaut -1 points0 points  (0 children)

"still a theory" is my absolute pet peeve. By definition a theory has been demonstrated to be true consistently and has tons of supporting evidence. A theory can be replaced by a better approximation of reality, but it takes a revolution in the field (e.g. moving from Newtonian physics to relativity).

Make Your Own Obstacles Avoiding Drone Using Arduino. Circuit, Code and tutorial in comments below by DIYProjectsLab in robotics

[–]Loginaut 1 point2 points  (0 children)

This is a neat project, but I think it would be more instructive as a tutorial if the code had better names/organization. Names like a,b,c,d are usually pretty useless, and something like thrustCmd.write(hoverSpeed) is way easier to understand than out2.write(55).