-
Posts
45 -
Joined
-
Last visited
Content Type
Profiles
Forums
Developer Articles
KSP2 Release Notes
Everything posted by Jirokoh
-
Hi everybody! (UPDATE on page 3, it's now sort of working) Hope I'm in the right section, I don't come very often to the forums, so just tell me if I got this wrong! So here's the idea: for a few months now I've been thinking about hooking a machine learning program to a rocket and pressing 'Launch' to see how bad things could go. I've looked it up, but it seems not much people have * actually* done it successfully. So HUGE disclaimer: I have no idea where this is going to go. Maybe I'll stop in 2 weeks, maybe I'll get super on board with the idea. But I think there's something really cool to try here and that's all I need. The main idea I have for how to do this is: - Control KSP through the kRPC mod, enabling us to run Python, which means we can import any machine / deep learning librairies alongside it. - Use reinforcement learning to learn from each launch, and try to improve the performances of the rocket. Note that here I'm not trying to generate a rocket design, I just start from a particular rocket and try to teach it to fly it. To put a bit of context around this, I have a few months of practice on neural networks (using mostly Keras over TenserFlow, which will most probably be the library used for running the basic neural network that will be trained) I have barely used kRPC for a hours the last few days to say what was possible with it, I just made a successful program that reloads a quicksave when a rocket after a certain time and looks at the altitude it's gone, to see if it was possible. I've also been through some of the documentation. Oh, and I've never done anything related to reinforcement learning, so just like when I started playing KSP a few years a go, I don't really know what I'm doing, but I have theoretical knowledge, and think this could be fun, that's good enough for me to start! I thought opening a new post here on the KSP forum could be a good place for me to first of all take the time to lay down what I want to do, and get some feedback from people that might have more experience than me, maybe some people might even want to follow progress on this! So to make things a little more interesting, I'm gonna give my IA a name, because I don't like how we just refer all the time to "IA". I'm going to call my 'IA' Bertrand. So, here are the initial ideas I have (this will be a bit technical as the trickiest part of this is to get a neural network running and interacting with KSP, while minimising the RUD counter). - In order to make any reinforcement learning, we need to define a loss function, this is what the neural network is going to have to minimize. Basically what is Bertrands purpose in life? What I would like to try for the very first stage is to get the rocket to a certain altitude. Say 50km to start with. That sounds super easy: just full throttle and nothing else. Yeah, but you haven't seen how dumb a untrained neural network is. So basically the reward function would be something like a function of the altitude, say Altitude*10 and you get -500 if you blow up (this is just a rough idea first, I have to figure out the specifics later). I think taking into the account the amount of fuel left when reaching the altitude is also important, as that's what we want it to do: be the best rocket out of all the self-teaching rockets out there, and make the best ascend possible, using the least amount of fuel possible. - Second, the controls: Bertrand, my IA, needs to be able to control the rocket to make it blow up fly it. But the thing is, with KSP, controls aren't really something we're short of. Remember, Bertrand is going to be really, really dumb at first, we're talking cat-walking-on-a-keyboard-level dumb here. I thought having control over yaw, pitch and thrust would be a good start. Since most rockets are cylindrically shaped, roll doesn't have much of an effect, and I think keeping just 6 buttons (2 for each control) is already going to be hard enough. I'm also afraid that if we start letting roll in, it will heavily confuse Bertrand, because it will change what yaw and pitch do. If this thing turns out to be a good idea, I might add multiple stages to my rockets and thus decoupling as a control. (I'm also pretty curious to see how it starts just randonly decoupling at any time and things just blowing up even more). But I'm worried that at first decoupling will make the capsule hop and give an easy win, so Bertrand keeps doing it without learning anything else. But we'll save that for later, let's not spoil Bertrand too much for now. - Third, this is going to need to run a loooot of times before Bertrand starts doing something not stupid and actually understand it has to throttle up and not do anything else to lift off. This is where my little kRPC program comes into play. I can make it reload the game as soon as the ship blows up, or reaches a certain altitude, and store the final altitude at which the game is reloaded. That's what I managed to do in a few hours of tinkering on kRPC, but I'm also going to need to register all the keystrokes Bertrand does, those are going to be the inputs of the neural network. That's a bit more tricky, but I don't think that going to be very hard. The hard part is going to be feeding that to the neural network. - Fourth I only have a Xiaomi Mi Notebook Pro, and that thing only has an 8th gen i5, with 8Gb of Ram and most laughable of all, an mx150 for a GPU. This bad boy doesn't have any issue running KSP at beautiful max settings and 60fps no problemo. But we're gonna have to train Bertrand too. And Bertrand is going to require some serious hoursepower to get better. This means I'm probably going to run KSP at a stupidly low resolution, and potato graphical settings to just even *try* to train the neural network. This is why it's going to be very important to keep the neaural network architecture as simple as possible! If that turns out to be really too long, I'll see if it isn't possible to use a Kaggle Kernel to get access to the free GPU and connect it to kRPC. Otherwise I might have to pay an online GPU, but I'd rather keep that as a last resort, I'm just a poor lonesome student with a bit too much time on his hands, but surely no money to rent a GPU. So I'll simply take this as the "optimization"' success trophy in my Bertrand plays KSP game. And if hooking a Kaggle Kernel to kRPC doesn't work, I'm not even sure it would with any other paid service; but that's for later anyways. - The idea I have, from this article from people that previously seemed to have relatively done what I want to do would be to use OpenAI's Gym, as a support for the reinforcement learning. OpenAI launched a thing called Universe a while back that was supposed to support KSP, but that got cancelled before we had time to see Terminator-powered rockets take over. But these guys (the ones from the article) made their own environment compatible with the Gym, which I will very happily clone, and tweak according to what I will be trying to do (after I eventually understand all of it). I'm basically going to use what these guys have done to try to get something working. I do think I should spend some time learning how to use OpenAI's gym on easier examples first before doing that though. So Bertrand isn't even going to see the world inside KSP first! That's basically how far my reflexion has gone for now. I've spend a good amount of time going through the internet looking for people trying this, and as I mentioned earlier, didn't seem to find anybody that did achieve this, apart from the guys who's work I shared in this last point. I also saw that a few years ago a guy streamed his neural network training, but that's long been finished, so I can't see that anymore Just to conclude here is what I have already done: Using kRPC, I made a program that goes on for 5 epoch (or 5 times) and each time makes the rocket turn after epoch_number seconds, then waits 5 seconds, gets the altitude the rocket got at after those 5 seconds, and reload to the last quicksave. These altitudes are stored in a dicitonnary called Dict_alt that is displayed at the end. This was my initial test to see if it was simply possible to be able to run multiple launches one after the other without me coming in. And storing in a dictionnary will probably need to be changed to a dataframe using a cuddly panda. TL;DR: I have no idea what I'm really doing, but I want to train an IA to fly a rocket, and I have a lot of work ahead of me for this to even remotely work. Anyways, if this is interesting to follow, well take a seat and prepare to wait a long time, and if you have any good ideas on how I could do this, things I have forgotten even if I haven't even started or improvements, please let me know! As I said, I don't really know what I'm doing with this, so all and any suggestions would be greatly appreciated! Thanks for having taken the time to read this! I hope this turns out to be a real project, maybe!
- 56 replies
-
- 6
-
- totm june 2019
- machine learning
- (and 3 more)
-
[1.3.1] Ferram Aerospace Research: v0.15.9.1 "Liepmann" 4/2/18
Jirokoh replied to ferram4's topic in KSP1 Mod Releases
My bad, the screenshot wasn't done properly, with Mach Sweep, it don't have results either- 14,073 replies
-
- aerodynamics
- ferram aerospace research
-
(and 1 more)
Tagged with:
-
[1.3.1] Ferram Aerospace Research: v0.15.9.1 "Liepmann" 4/2/18
Jirokoh replied to ferram4's topic in KSP1 Mod Releases
Because that was the only thing that would give me something... I guess?- 14,073 replies
-
- aerodynamics
- ferram aerospace research
-
(and 1 more)
Tagged with:
-
Hi there! I'd like to use HyperEdit on a moded RSS, RO KSP version, running on 1.2.2, but somehow the orbit editor doesn't work. I can use all the other elements of HyperEdit, but the one I'm most interested about is Orbit Editor and when I click on it, nothing happens I'm using version 1.5.3, since it's the verison for 1.2 of KSP. Does anybody have an idea of the problem, and a solution? Thanks!
-
[1.3.1] Ferram Aerospace Research: v0.15.9.1 "Liepmann" 4/2/18
Jirokoh replied to ferram4's topic in KSP1 Mod Releases
Well, Maybe it's just me that doesn't know how to handle this mod, but it seems like I can't get any results out of this I'm trying to get data for my lander, that looks like this: And when I use FAR, this is what I get: As you can see (not much, but still a little), the velocity vector is upside down, so I tried inputting 180 in pitch, but it gets stuck at 1. So... Am I doing something wrong? Or does the stability just not work for landers, but just planes?- 14,073 replies
-
- aerodynamics
- ferram aerospace research
-
(and 1 more)
Tagged with:
-
[1.3.1] Ferram Aerospace Research: v0.15.9.1 "Liepmann" 4/2/18
Jirokoh replied to ferram4's topic in KSP1 Mod Releases
Awesome, thanks a lot, I'll give that a try!- 14,073 replies
-
- aerodynamics
- ferram aerospace research
-
(and 1 more)
Tagged with:
-
[1.3.1] Ferram Aerospace Research: v0.15.9.1 "Liepmann" 4/2/18
Jirokoh replied to ferram4's topic in KSP1 Mod Releases
I'm currently working on a Mars lander (here's a topic about it https://forum.kerbalspaceprogram.com/index.php?/topic/170840-student-contest-for-designing-a-10t-payload-mars-lander/&page=2&tab=comments#comment-3324343 ) , using RSS, and I would like to implement Ferram to have better aerodynamics. I'm using 1.2.2, is there a version of this mod that works with it? I've tried looking it up, but I can't find a proper answer, so I guess I should just ask here; sorry if this is the 10,000 time this question is asked If it is, if you could re-direct me to a link, that would be great Thanks!- 14,073 replies
-
- aerodynamics
- ferram aerospace research
-
(and 1 more)
Tagged with:
-
Student contest for designing a 10t payload Mars Lander
Jirokoh replied to Jirokoh's topic in Science & Spaceflight
Hello ! Just a little update for you guys, just to tell you what designed we started to take: So the basic idea was to make a lander that can put a 10t payload on Mars. But, we decided to see what we could do with a Falcon Heavy, because it's basically FH or SLS, and SLS is much, much more expensive than FH. Keep in mind that for the contest, we need to be able to design, build and launch by 2026. Since money is also a big factor in this contest, we decided to have two configurations : - FH launched lander which can put (rouglhy) 6.4t on Mars. That's not 10t, but we can send multiple ones, for the same cost of one SLS launch (and we are sure we can send it by 2026, because well SLS is... let's say delayed... ) - SLS launched lander, that can put the 10t payload, which would be used for the manned missions, as well as all the payloads that would be in one block (the biggest crew modules for example) Let's get the big one out of the way: the SLS one is going to be pretty simple, just like most landers up to now: big heat shield, and big retro rockets at the end. The most interesting part is the FH one: FH can send up to 16.8t towards Mars, so that means we have to take mass down as much as possible, while using current technologies, no fancy warp drive, or Kerbal nuclear reactor. So our idea is rather simple, as mentionned earlier, we are going to do an aerobraking, to save as much DeltaV as possible, and thus as much mass as possible. This makes the mission last a long time (and this is why we are not going to do it for crewed missions, let's not let real life Jebs stay for months and months aerobrake around Mars) We tried this, and the results are pretty good actually. First of all, thuis is our what our module looks like: You'll notcie that the mass is slightly above 16.8t, but since we don't have the exact mass distributions, and more DeltaV than we are actually going to have, that's not a big issue. Same goes for simensions, our lander is going to fit in the 5.4m diameter fairing of the FH. So this is to get a basic idea, and what we did is use a whole bunch of mods (maybe too much actually), but the aim is to use RSS and RO to have the most accurate modelling possible. By the way, does any of you know which mod we could use to have the best Mars atmospheric models for our simulation purposes? Because we can have a loooot of info with KSP, as you can see (and probably already know): Here we are at about 79km, at our periastre, and the aim is to lower the apoastre by doing multiple paths. But since we want to be pretty accurate, we are using data provided by KSP to get the ballistic coefficient, as well as drag information, to use another software, to modelize Martian atmosphere re-entry. The thing is, drag (and thus ballistic coefficient) change depending on the Reynolds number, or the flow around the spacecraft. But our re-entry software doesn't take that into account, so we used an avergae value, by doing multiple passes with KSP. This is why we want the most accurate simulation possible with KSP. Actually, we are also working on Ansys to make a CFD model of our lander, to more accurately get those drag, lift and ballistic coefficient. By the way, if someone can provide help with that, please get in touch! Just to give you an idea of the result withour software, this is the type of things we can get: Oh, we are French by the way... So on the left we have altitude depending on time, and right thermal fluw depending on time. These parameters are given for a 12t lander (this is after having done our elliptic insertion burn), with a ballistic coefficient of 600, for an orbit that has Apo=1000km and Peri=80km (the thing is, this software was designed by someone I got in touch with that works at CNES (French space agency), but it's in no way a finished software, so if we try to simulate an orbit with a Apoastre of 15,000km, the thing crashes; there must be an inside Kraken build in too...) So, have some pretty good data up to now, this was just to let you guys know a little bit what we are up to But we also have a lot of questions: - What's the best mod for modelling the atmosphere of Mars - What are the limits of such modelisation (because this is where it makes our project be credible, if we use something, it's important to tell what are the limits of our simulations, and what impact that has) - It seems the ballistic coefficient has a very big influence on the trajectory of the lander, but we do not fully understand why it is so import, if someone has some explanation (with solid evidence like always, would be even better) - Why the hell did we even try doing such a project in the first place? Because... deadline is 31rst of March Thanks for reading, helping and being interested -
Student contest for designing a 10t payload Mars Lander
Jirokoh replied to Jirokoh's topic in Science & Spaceflight
I don't think I understand this tech, how does it actually work? And for parachutes, we don't yet have the tech to make strong enough parachutes to hold such mass going at such speeds. So I think we are going to pass on that one -
Student contest for designing a 10t payload Mars Lander
Jirokoh replied to Jirokoh's topic in Science & Spaceflight
Wow thanks a lot for the long reply! Just a few things to mention: I think I didn't express myself correctly, I should have said it more accurately. Actually 10t is the payload mass, so we need a lander that can carry 10t. The whole lander might be 15, or 20t in total. Then, for the aerobraking, the idea is actually to do a hohmann transfer, because we are going to need to do it anyways. But this has never been done before for a lander, hence my question. Because the conditions of the contest are that we are approaching Mars from interplanetary space with a hyperbolic velocity of 3km/s. So we are going to need to slow down a lot. One of our idea was to do a Hohmann transfer to a lower orbit, and also reduce our DeltaV required for landing. Finally, we can't do any refuleling in ornit, this is something that we can't do know, so this is too much in the future for the rules of this contest, even if I agree this looks like a very interesting idea, but just not for us But yeah, one thing is for sure, we are going to be doing quite a lot of maths -
Student contest for designing a 10t payload Mars Lander
Jirokoh replied to Jirokoh's topic in Science & Spaceflight
Thanks for the answer! Actually for slowling down we were thinking of using aerobraking, just like the Mars Reconnaissance Orbiter. This has been done on multiple probe,s but was never used for landers. DO you guys know why this is the case? I know aerobraking is pretty tough, and very long, but we don't care because this is not a manned craft, so we can take all the time we want. One thing that is important is that the craft must be designed, build and certified before 2026, so no crazy new tech should be used, that's why we thought of aerobraking, because it's a known technology and method -
Hello everybody ! First of all, if this is inappropriate, well let me know, and sorry if it is, I just hope it's not So here's the deal: I'm an aerospace engineering student, and with some friends we decided to take part in a student contest held by The Mars Society. the aim is to design a lander capable of landing a 10t payload on Mars. So, that's not really an easy task, considering the most that ever was landed was the MSL, Curiosity, which is less than 1t. So, I'm calling for some help amongst you all! We are students, and we are seeking for all the help we could get, so I figured I might try asking on the KSP forums, after all we all love this kind of challenges in game, so why not in real life? We have a bunch of ideas, but we do not really know to what extend those might be possible, and this is why I'm asking for a little help So would any of you be willing to help a few students designing a heavy sized Martian lander? Thanks a lot! And again, if this is inappropriate, please tell me, and I apologize if it
-
The "You know you're playing a lot of KSP when..." thread
Jirokoh replied to Phenom Anon X's topic in KSP1 Discussion
Hmm... Never thought of KSP as a burger, but you do have a point So, can KSP have too much cheese? -
The "You know you're playing a lot of KSP when..." thread
Jirokoh replied to Phenom Anon X's topic in KSP1 Discussion
Yesterday I screwed up a launch, decoupled the fairing too late, forgot to deploy solar panels so my batteries went empty, I basically ended up with a dead satellite. So I was kinda dissapointed by my launch. I was pretty tired so not really into what I did. So this morning, when I was starting to wake up, I thought to myself, half concious, half asleep: "decouple blanket, extend legs". Then I finally woke up and thought I should maybe KSP was taking up a bit too much of my thoughts lately -
In Paris, going to a local pub to watch the launch live!
-
I know, I know Well basically Russians didn't have the best organisation, so I'm left with having way too much time to blow up Jeb in all sorts of manners then to study
-
Thanks for the welcome!
-
Hi there! I'm still a relatively new player to KSP (about 50h, done some stuff but still a lot to learn!) I've been looking around the forum for some time now, but just decided to register Other then that, I'm a aerospace engineer student, currently stuyding in Moscow! But having some free time (yeah, don't ask how that's possible in engineering school) I got back to sending some greeny looking dudes to space (we'll see the returning home part later, just don't ask now) I have to say playing this game helped me way more then the lessons I got on orbital mechanics, and how orbits, referentials, etc. work Oh and I also got to work as a student job for a about a year as a "scientific" animator at the Cité de l'Espace in Toulouse, for those who now about it. So basically I was paid to explain rocket science to people, much better then working at McDonalds So basically I like planes and rockets, like I think a loooot of people here Cheers!
- 17 replies
-
- 11