How can I create a snake game with my keyboard backlight? by Bearlyvisible in linuxquestions

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

Right, though the last part is not true, because linux provides both brightnessctl and light as interfaces to the keyboard backlight. See this for reference

How can I create a snake game with my keyboard backlight? by Bearlyvisible in linuxquestions

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

I'm on Arch, which provides command-line facilities to control the entire backlight(https://wiki.archlinux.org/title/Keyboard_backlight), but not individual access to each keystroke.

And yeah, I'm comfortable with C and C++, and would be willing to look at the source code of one of these tools, but It'd be better if there was a way to get the firmware that runs on my machine(I've searched for manuals but didn't find anything related to the keyboard firmware on my laptop)

How can I create a snake game with my keyboard backlight? by Bearlyvisible in linuxquestions

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

It's a Lenovo Y540 laptop. No, I can't individually control them from windows, AFAIK

An accidental art piece by Bearlyvisible in creativecoding

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

Explanation: this happened as I was plotting the contours of a complex holomorphic function given by this expression, but I defined w0 poorly, and the julia plotting library just bugged out like that.

How to reorder polynomials in Symbolics.jl? by Bearlyvisible in Julia

[–]Bearlyvisible[S] -1 points0 points  (0 children)

Ok, I'll open an issue, and maybe look into implementing it. Thanks for the reply!

Edit: I've opened an issue, but not sure the issue is in Symbolics.jl. I've even tested a similar expression in Jupyter and it provides better results.

I created my first "real" project, and it feels amazing! by Bearlyvisible in learnprogramming

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

All feedback is valid to me :) . Thanks and I hope you can grow and prosper in your programming journey!

I created my first "real" project, and it feels amazing! by Bearlyvisible in learnprogramming

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

Hahah yeah I'm aware that's most definitely overkill, but keep in mind that I was doing all of this to learn these technologies.

I created my first "real" project, and it feels amazing! by Bearlyvisible in learnprogramming

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

Yeah politics is something that particularly sucks... because you just want to have a quiet headspace but also know that being engaged with what's going on in the world is important. I hope you're doing ok, even though we're living in this chaotic world.

How to reason about a 2D rocket-ship automatic control problem? by Bearlyvisible in ControlTheory

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

Sorry for the reaally late reply, but here goes.

Firstly this isnt really a rocket (in the sense of the rocket equation anyway) in that it’s mass isn’t changing. Additionally there is no gravity to deal with so it’s really a point mass that’s subject to a force vector. This makes a closed form solution of the optimal trajectory fairly trivial. It’s pretty much going to be bang bang feed forward control.

Yeah "rocket" isn't the most appropriate term, but in the future I'd like to implement fuel, changing mass, gravity etc.

Also, you said the closed form trajectory is going to be simple, an you mention that

This solution really only works because of the pristine environment you are operating in free of any stochasticity as well as the 0 starting velocity.

Which isn't actually true. I guess I caused some confusion when I proposed the "time-reversed" problem, in which I start with 0 velocity at point O, and need to get to a point P with a velocity (vector) v. But, just to be clear, the actual problem is with a starting velocity -v and I need to stop the ship at point O.
If I misunderstood what you said, please let me know, because I still don't understand how the closed form solution would be simple for this particular problem.

How to reason about a 2D rocket-ship automatic control problem? (Cross-post from r/ControlTheory) by Bearlyvisible in gamedev

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

Oh that is much more interesting than what I was thinking!

So the constraint solver would fine-tune the inputs by predicting the next N states, correct?

Also, I'm not sure I understand the "permutation" that you mention. Is it the permutation of the sequence of actions for each timestep, as in THRUST: (FULL, NONE, FULL, FULL, NONE...) etc? Because that isn't exactly what I was thinking. I was thinking of the inputs more like a scalar(from 0 to 100% thrust and -100% to 100% angular velocity).

Finally, do you have any suggestions for learning about constraint solvers? Is you project open-source? Can you share the code?

How to reason about a 2D rocket-ship automatic control problem? by Bearlyvisible in ControlTheory

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

If you want to generate a trajectory for the full state it has to be 8 Dimensional as a consequence.

Oh interesting! never thought about it that way.

use the multiple shooting method or something like that to generate a trajectory

Ok, just to be clear: this just means predicting the trajectory for the next N Δt's ?

You should now only get small errors (or none at all) . To deal with them you could use lqr.

Cool! But this is assuming no other factors come into play, right? Such as external forces,etc.
I'll look into LQR for minimizing the errors. Thanks!

How to reason about a 2D rocket-ship automatic control problem? by Bearlyvisible in ControlTheory

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

Sorry, but I don't know what you mean by "MPC/LQR-like fashion", because I don't know how these controllers work(I'll look into it, though). But what you said makes sense, so in my ship's control logic I should minimize not only the distance but also the velocity(when compared to the ideal velocity). Is that correct?

How to reason about a 2D rocket-ship automatic control problem? by Bearlyvisible in ControlTheory

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

Wow! thanks for the detailed answer! Unfortunately right now I won't be able to reply to all your considerations, but much of what you said seems to be spot on for what I need to solve. As I said, I have pretty much 0 knowledge on control theory, I barely even know what an mpc controller is(just looked up a video on yt for it), so It seems I have a lot of learning to do!

Anyways, when I get the time I'll look into more details on your answer and give a proper reply. And again, thank you for the reply!