 Hello everyone. Thank you for coming out. I know it's the end of the day and hopefully this one gives you box It makes you walk away with some energy and some pep and a whole new project You'd like to join me and work on so for a show of hands. How many people saw my Cartesian genetic programming talk before? Fantastic, okay for those of you that did not I'm going to skim through some of the material that's was already covered there In the interest of not boring 85% of the audience Democracy we got it all right so Again presentation protocol dictates you need this header So I have to tell you about this stuff. This is what I'm going to tell you so now you've been told I'm going to tell you But the interesting thing like most interesting thing is down here in this gray area There's kind of a morality lesson to be had there at the end and I found very interesting It was very exciting for me at this research Which came together right at the end? I wasn't sure which way the morality was going to go on the airplane here So it was very exciting right towards the end and I can't wait to share that with you But first off you must understand the the mindset what leads a person to want to evolve a custom communication protocol Besides hacking and for me How many saw the part-time scientist presentation? All right a couple okay, we're sending a rover to the moon So something about the size about this podium laid down with wheels drives around it'll actually go to the moon in a couple of years sooner if we can help it and We need a communication protocol to talk to our rover as there are some special needs there so we had to devise one and You know the technical statement what we're looking for is you know your classic given and create So there's a fixed set of hardware. We have to deal with I don't get to choose that hardware Much like most of us don't get to choose the hardware and ATMs or anything We have to deal with the sum of this hardware. I work with somebody who can choose hardware right here in the front row So you know I'll direct I'll direct negative questions to him We have video and data telemetry streams coming down from the moon and being received at large satellite dishes on earth and on earth we have human drivers sitting there and They're watching this video and this telemetry about temperatures and batteries and they're sending up commands up to the rover So I have two types of data coming down and one type of data coming up So we have different, you know, essentially three distinct sets of data streams. They have to flow flow here and Our you know our technical comps. I make my college professor proud is we need to make a finite state machine To do application and network layer control for a symmetric transceiver that's identical on earth and the moon all right, so we're building a transceiver building a finite state machine and We got to deal with these three separate things It's not quite that simple. You can't just sit down and sketch it We have some constraints first off a Major option for us in this thing in this Discontest to send a rover to the moon is to use the public airwaves ham radio amateur band radio Which means we must be open published protocol Cannot use encryption every one of you in here must be able to look at any packet we get and be able to decipher it And tell what was in it We also have very long latencies It takes a second and a half or so for light to get from earth to the moon and then the response to get back And that doesn't sound so bad, but try remote controlling a car Where your eyes are blindfolded and you have one and a half seconds to three So actually three second delay from the time you say turn left to the time You see a bump into the wall because you did at the wrong time It's it's a little tricky, but it is part of the protocol. We must deal with Our packets are very precious to us When they when they leave that rover They represent an investment in energy that we could have used to move that rover or to maintain the temperature on the battery And let the rover survive longer We chose instead to put that energy into the radio communication system for that one packet So we have to be very careful with what packets we send we can't send every packet 10 or 20 or 30 times Just to make sure it gets there. We have to be careful and If we lose too many packets We won't be able to prove that our rover was there or that it drove far enough on the moon and we lose 10 20 30 million US dollars So these packets are very precious to us, but we can't send too many of them because energy is precious to bandwidth Infinite bandwidth no not in the infinity of space. It's limited and it's saturated with the video stream That's mandatory to win the prize So we've already saturated that And once our once our communication packets get down to earth and they land end up these big dishes Maybe down in Australia, maybe in your backyard They're going to get tunneled through somebody else's protocol and wind up at a central station and TCP IP is not an option for us basically Connection-oriented protocols aren't aren't really an option It's because maintaining that with the latency just works out to be really bad So I know how to do this process. You know how to do this process You sit down with everyone involved and you debate and you come up with a design and you debate it And you come up with a design you debate that and then somebody brings up the debate You had last week about last week's design and you just keep doing this cycle I love math equations for simple things humans do so that's ashamed with math equation There aren't too many of them in this So once your arguments settle down and all your you're not really debating algorithm anymore on the protocols You're debating timing statistics. You're debating parameters knobs. You can tune and adjust Great, then you just build a parameterized algorithm where you can plug and play these parameters Maybe you pound to find them in your code and you just do a little one-off simulations to see how it's running That works for about an hour And you start emailing people and they're like, oh, what about this combination about that combination? You're like, okay, fine. We're going to try all combinations So you end up with big arrays and we've got more arrays and the stuff we tried big arrays of parameters You can try and I'm sure anybody had to do this kind of stuff a Couple hands fantastic. Thank you. I'm not alone. I love this conference. So You end up sweeping through all of these and you've got to do them at random and you have to do these parameter sweeps and This is good for about a day until you realize my computer is busy and I'd like to play games on it There must be a faster way to get this. So you start sorry fine. I'm gonna I'm gonna learn GPU programming I'm gonna push this stuff to a GPU Where I can do it faster and I will say we had great luck with this we had great luck with that But it's not the end of our project We we we ported unoptimized C++ code to a to an NVIDIA GPU Unoptimized just to see if it worked and it was kind of kind of interesting is that one second for a simulation outside of the GPU 700 seconds for that simulation on the GPU which normally a 700 to one slow down is pretty miserable, right? But you can do so many of them at the same time on the GPU that it netted a seven time speed up Which was cool. So now I could let the thing run for a couple of her a weekend or so and I came out with all the simulations We needed Which is great because then I could turn into my boss and the rest of the group. Hey, look, we've got results We can stop arguing. We're almost done with this project not done with the presentation that we leave and You end up with this China chart to say let's look at how many communication outages we had in the simulation and Let's look at how far the rover was able to travel. We'd measure wheel ticks 2024 ticks how far the wheels able to move because if we move far enough we win money So wheel ticks very important mission parameter for us and we start to say, okay If I send you a packet and I don't hear back from you in five seconds I'll send it again. So that's our timeout or I could wait 30 seconds. Which of those leads to a better mission And if you've got really really really terrible communications. Yeah, they're about the same If you've got pretty good communications, you want short timeouts Then you recover, but you know now we have numbers no more gut feel numbers and we can move on and I thought we're done. I was pretty pleased with that We've got 20 or 30 pages of these graphs and some recommendations for all the parameters like, okay. How are we done? Wait, wait, wait, wait, wait Then in the nature of any kind of project where you're not necessarily in control A few small changes come up You know the the boss in our case is talking to new sponsors talking to new potential sponsors partners Anything and the rules start to change a little subtle ways for us software people You know we tend to have to implement these dreams and communication protocols not not any different than that So Our little algorithm had to change here so given changing requirements, we must complete a Continuous loop of do this over and over and over at all times We need a working communication protocol because we have to be able to demonstrate at any time But every time we talk to somebody we need to be able to tweak that protocol Maybe for their network maybe for their concerns their IT department gets involved, you know, you talk with somebody who's got a host of big dishes They want you to tweak the protocol a little to be friendly with their software Okay, well, how do I treat tweak that without breaking anything and Anybody a minute in this kind of situation? All right fantastic All right, that'll give you a headache But I think I know in general we all know what to do here Wait for it So in general We all sit down and we're like, okay, let's over design this thing. There was no laughter from the crowd. This is big deal Anyway, I thought this is hilarious. My boss wants to put this on my cube It's like okay I know how to solve this problem in general and it means skipping the human debate and it means moving to computer algorithm invention and With my new favorite thing Cartesian programming moving to that where We show up with inputs outputs. We show up with packets We want sent and things we want metrics we want from our communication stream and We stop arguing over the algorithm and let the computer come up with the algorithm for us We actually, you know, this is a slide from before anybody recognize this one Yeah, excellent We start inventing algorithms that look like this We start letting the computer stay. I've got a series of inputs. I'm gonna connect them up this way and see how it does We start to get into genetic programming actual algorithm invention And just take the whole human debate out of this and just be confident that we have a process It's going to work over and over and over so Very briefly Because again, most hands went up and I said have I already told you about Cartesian genetic programming We like it because it generates circuit like things and circuit like things are very important on this mission because we're using FPGA circuits, which can be reprogrammed and We need the ability on an FPGA chip to send communication packets that are caught by the FPGA and used to rewrite the OS level In our system, so there may be cases where the hardware has to catch packets and process them in hardware Instead of just having saw all the full abilities of you know, megabytes worth of RAM available to software Hard some hardware implementation has to be handy. It's very important for our mission And we try to keep it pretty simple whatever a hardware could handle All right random circuits shake it all up after scoring it Things get a little better repeat Okay Everyone remember this little terminology here Excellent. I did tell you there's a quiz last time, right? All right This stuff ran so slow This new way of doing it for communication protocols ran so slow I actually had to put a few hours into optimization dynamic optimization the key thing with Optimized performance of Cartesian genetic programming is to look through the grid trace back through the outputs everything That's actually needed and when you execute only execute those nodes the nodes are trivial You're adding two numbers together But yet if you can wrap that with it with an if data at some Boolean pointer if you can wrap that You really do get like a five or six times speed up because it turns out Cartesian genetic programs tend to be very large You know, they tend to be they find that researchers say 4,000 nodes will evolve faster and better solutions and then I'll say 500 nodes Even though they may have the same number of active genes at any given instance in time It's something about the search search algorithm. So this is critical for speed ups So we will skip that little bit of code overview where I show you Individuals which is really just a ray of floats how they're executed Optimization is pretty simple. That'll be in the code that's released for this project and Let's get more to Goals of the attacker. Let's start talking about the simulation We have to do the things that are really different than what you saw maybe the prior presentation The attackers got some serious goals We need an attacker in this mission because we have to we have to say when we have we have to know We're talking we're talking public which means anybody in this room including me if I was bored Could try to mess with this mission And we have to say what would our back? What are the attackers goals here? First and foremost the attackers trying to take over the rover if the attacker can drive that rover over a cliff They only need to give one command You know get a command in there to get it over the cliff before we can get a command to it Tell me to stop and they win All right, so one one rightfully placed command can make all the difference That's a mission under for us They could also make the rover just sit there make it ignore anything. We send it Get it confused make it trust the authority of ground control would also end our mission as well because if we can't drive we can't win Also if we can't prove the video was authentic we lose as well So if they're able to confuse our ground station about the authenticity of the video coming from space that would also break the mission Other high risks are confusing the human drivers with false telemetry They might still rely on the video But if they're looking at the data the AI on the ground making risk assessments would be Questioning what the humans are trying to do and we'd have to switch over into a total manual mode and that gets really dangerous They could also delay execution of rover commands, which would bake the rover in the Sun before it got far enough So there are there are some bad things you can do here So armed with those goals of the attacker we created a discrete event system simulation Which sounds fancy and I will show you the code to say this is really simple trivial code And I hope all of you are engaged enough to try it a Queue of events actually ended up implementing it not even as a queue because you end up don't needing the new and deletes if you can avoid that set of actors on stage taking part in the simulation and Just a few little details while packets for simulation purpose as a packet is a payload of data It's a command lump of it's a lump containing a command or video or telemetry It's that lump has an ID So we know which lump it is its command number seven thousand and then it's a series of header control flags They tell you what to do what what to do with that and whether that's you know authentic or not And it's also sit also a signature like an error recovery signature, you know And we also introduced actor outer space. So we've got the transceivers are building we've got outer space and we've got the attacker Outer space is kind of interesting yet I tried this simulation without outer space or I should say with a perfect outer space to just no attacker and it just let packets flow and I Would be embarrassed to call that code because what came out of the system was essentially, you know Trivial, you know if true blah, you know, I mean it's you end up with nothing that would pass any kind of robustness So at a minimum we found that you need some kind of at least Trivial attacker in our case outer space in the simulation in order to evolve a communication protocol And we gave this one the ability to just lose packets. So hey, hey ground control. I got this video Ground control like never heard it never got it We can replay space could cause a data packet to somehow get echoed around and Have ground control see the same video frame twice or the rover to see the same command twice The rover might also see its own video packets coming back Echoed back to it and any of these packets anywhere at any time could be corrupted But some potentially even beyond the ability of whatever Forward error correction put on the packets. So spaces space plays dice, but does Kind of harsh on the packets so Next in the communicate next in the the structure of our Communication system as we look at the transceiver as a set of as a set of chromosomes Cartesian genetic programming chromosomes, but we're really actors So when the simulation says I have a video packet that has to go Okay, this guy data ready to transmit that actor is going to be engaged and that actor that packet presented the actor And the actor will tell us what control flags to put in the packet whether or not to even send it and Then likewise and data comes in how to deal with it including the choice of whether to accept it or reject it So you don't have to accept every command that comes in you can just discard it and then We gave also the ability to have a queue of command packets Up to 10 command packets some small hardware thing And if any of those sit in that queue for too long then those get expired because it turned out adding that saved a whole lot of Mental hassle about how to figure out how to evolve that functionality So there's still still a little hand to God had to be dipped into the evolution there Wanted to point out some feedback from the last one Cartesian genetic programming is that we made heavy use of chromosomes in this case A key tenant or genetic programming is the copying of partial solutions from one generation into the next So don't just take the best one and move it forward take some part of one that wasn't so good and move it forward as well and Cartesian genetic programming does that through the use of its chromosomes We use the complex chromosomes from the prior lecture to really make really accelerate this They're scored separately promoted separately and you end up making super individuals the next generation that contain the best way of doing everything Don't worry. I'm building to that gray moral in the gray area here stay with me All right, so our attacker is almost Superman Our attacker is co-evolved Every time the transceiver gets a chance to improve. So does the attacker So they are they're neck-and-neck for as much computation effort as available Our attacker has full knowledge of that packet structure. So there's no reverse engineering the attacker has to do here Our attacker can crack our private keys We presume that if the attacker has seen a certain number of video packets That they will be able to reverse engineer the private key used to create then sign those packets So I think consider that a worst case no matter how many bits we want to put that in we assume the attacker can crack that It has a large bank of computer is trying to help them with it We assume that the attacker sees every communication between the ground and the rover. You cannot hide anything from this attacker However the attacker cannot be man in the middle we are sending through space to dishes on the earth The attacker does not have a satellite that can block those signals and retransmit them So man in the middle is not allowed in this scheme. It would be interesting to see what could come up with but it's not something we simulated The attacker is able to send to the moon the attacker is able to send to the ground stations Although there is a risk when sending if an attacker were to send through radio to a ground station the ground station would recognize that did not come from the moon and that it was from an attacker and You may have you know to move Shortly because there is somebody who's going to start tracking down that transmission So when an attacker transmits to the ground station their best bet is physical attack on the network lines And to inject packets in that way not to transmit them over the radio All right, but we assume that the pat the attacker has that advanced ability to get those their packets into the data stream as if they came from the moon So I consider that superman Perhaps other people know other advanced other abilities the attacker should have but I think that's a pretty pretty harsh attacker to evolve with Furthermore the attacker we consider is stateful So it sees every packet and then it makes the decision to send a packet that goes out And who would I send that to or should I even send a packet? Maintains a full state machine for itself As well as has a timer so it can get poked even when there isn't a packet arrived that allows it to launch a denial of service attack The attacker is also very large Computationally large, which is why these simulations run so unbelievably slow It's much much much larger than any of the Any of the cartesian genetic grids we did for the transceiver So it's to again to mimic an attacker with many resources behind it So try to give the attacker every advantage we could And then We're very close to code and then we'll start talking some of our philosophy here So when you look at these simulations You have to look at fitness Okay, and so when you take one of these individuals a potential protocol you evolved You run it through the simulation and you see how well it did how well it did that score is its fitness And the idea of darwin darwinian idea that the strongest survive the most fit survive In the the data you'll see here the most fit are the ones that made the fewest mistakes will have the lowest score All right, I personally find it easier to write complaints than praise So the fewer complaints the lower the score and therefore the more fit So when you see charts going down it's getting better All right So every generation you have fitness and then every once in a while You'll do something that's better than you've ever seen before and that becomes your best fitness so far And so you'll see generational fitness do something you'll see best fitness step down And every time you come up across something that's better than you've ever seen before You stop and you do a validation You say, okay, we have done my little simulation. I want to do a very harsh simulation I want to do the real job How well does this best thing that I've just found how well does it do against a real validated test And that's under the idea that the validated fitness is ridiculously hard And ridiculously expensive computationally to do so you're taking a little shortcut by doing fitness a smaller fitness evaluation in order to do the evolution And in our case we have a series of penalties here So if I'm the transceiver and I get a packet in I'm like, hey, I like this packet Put it signed with the wrong key Okay penalty Success for the attacker. That's a reward for the attacker. So it's plus equals fitness for the transceiver and minus equals fitness Which is a good thing for the attacker Accepted a packet that came from the attacker accepted unknown data lump So if somebody offers me data lump seven thousand Whether it's command seven thousand or whatnot And that just doesn't exist and I still accept it. That's a problem If I accept a command more than once That's not necessarily a mission ender if I say accept the turn left command command number seven thousand turn left accept that twice That's not necessarily a mission ender because somebody might still be able to write a little code to Detect that and only execute that command once but it's still a hassle. They have to deal with so there's still a penalty there Likewise if I turn back every packet say well, I'm doing terrible by accepting all this stuff So I'm just going to close the door. Well, that's still a bad thing. There's still a penalty there And so forth. Oh in the attacker We spank the attacker every time this transceiver does something right Anytime a valid command actually got through we tell the attacker you did something wrong you can do better so I will say this list was not the list we first started with and that we had to evolve during this Okay, there's there are some tips about this One very important thing Is remember I said we have to validate when things go when you come up with something better You have to do some validation This is the type of chart you'd want to do is you want to do a whole bunch of probing runs And then you want to look at the fitness and validated fitness you come out of those And you need to make sure they are correlated. It doesn't need to be a nice straight line. Okay It doesn't get all straight liney down here So don't worry about that that fit, but it is a monotonically increasing thing. It does have a good spearman's fit It's important to say the little tiny fitness that I run is well correlated to the much more expensive validation that I run Because if things validate well, then I'll accept that into the mission So overall things you want to look at is well, can you do can you evolve a communication protocol of Cartesian genetic programming? Is it robust? I mean, is it actually useful? And if you'd had to do it again, can you do it in isolation? Do you have to have only poor signal quality like outer space? Was that enough or do you have to have an attacker? and Kind of interestingly if you had an attacker Does an attacker evolve faster than a communication protocol? Does one win? Is there a winner here? That would be of interest All right, so I want to show you some code quickly. How are we doing on time? Sorry, I don't have my watch So main loop. Yeah, yeah, I should have bookmarked these Okay, so So your structure is you have an experiment of course And your experiment here we go your experiment contains You know nifty little run you want to run your experiment you're gonna To run an experiment you create a series of worlds And in each world you assign it A program to run for packet receive data ready packet expired and an attacker And what you want to do is combine every attacker with every individual So if you have if you have four attackers and you have you have four individuals up here You've got 16 worlds you need And then you need to do these worlds A whole bunch of times because it's stochastic. It's got to be random We'll talk about that why that has to be a little later So it has to be random So every every pairing has to have a whole bunch of runs to go with it But each one of those runs is a world That structure seemed to work pretty well. It kept the code easy to write And Anybody use open mp are the only one who uses open mp anybody use that a few people okay It's a super simple way of getting parallelism in your code This little pragma says do every do this for loop everything in here as many cores as you have on your processor So my case this will run eight worlds at a time and you turn it off for debugging Now it runs one world at a time. You can deal with your pointer problems In my case, I had a lot of pointer problems debugging through this so narrowing it down to one world was very helpful So execution is pretty simple And then it's a matter of just going through Going through and totalling up the fitness for each of the each of the worlds that you ran How well did these things do in each of the worlds? Well, you know in the first world the uh data ready. Hey, I've got data I want to send it out that little program that logic might have done terrible, but the received one did pretty good So you need to add up all those fitnesses Um get them averaged out Little cleanup And then it's a matter of scrolling through not the worlds but the population And say who's got the best fitness so far If anything got better dump out some visualizations Do your validation Pretty straightforward validation looks a lot like this. It just doesn't use an attacker Validation is outer space on steroids That's just noisy. I mean it has almost, you know a 70 chance of echoing packets and corrupting packets It's just the worst possible static you could imagine on the line To see how many commands can I actually get through there? So pretty straightforward stuff there So can Cartesian genetic programming make control logic? Yes This is control logic for data ready for a uh just one of the random examples we ran This is uh an absence of an attacker Yes absence of an attacker And it's pretty straightforward once you get the hang of reading it. So my inputs are the state machine For the transmitter The shared state across all chromosomes The data type that's ready to be transmitted The sequence number that would be assigned to the packet if one got sent And the oldest sequence number that's sitting out there that we've not heard back from So if we've sent a hundred commands and we haven't heard about command 12 That sequence number would be out here And then we're told okay update your own state update the shared state How do you want to sign this packet and then give me two two control flags you want to put on the data packet? And then hopefully that'll be received and decoded by the outside You've got some real garbage in here. I will admit there's some junk So normally what you would do if you were to convert this to real code You would you would auto generate this Into say c code and then run that through let the c code compiler Tell you that transmit state greater than transmit state is always false And they're adding zero to that doesn't do anything and negative zero doesn't do anything So this is always going to shove a zero to the shared state So you'd let the compiler deal with that. That's nothing you have to bother writing as long as you realize there's a next generation You do is code code generation Contrast that with control logic when you have an attacker So much bigger To the point we got to get a little squinty. I'm sorry. I couldn't fit it all on there Is either that or cut off some of the spaghetti down here There's a lot more control logic you notice Same size cartesian genetic grid in both cases But more control logic evolves in presence of an attacker, which I found interesting just Aesthetically I find it more interesting There is a There's a lot more uses of ores. There's man's there's some greater thans in here I do find there's sort of a propensity to use constants like this is testing to see if oldest sequence is greater than the constant seven That's a little red flag to me about further research being needed and that's uh That to me says this thing's memorized something about the number seven There shouldn't be anything magical about a sequence number seven and a valid simulation So there's a little little unexpected undesired memorization going on here, but it was getting close Some tips when doing this and I'm building we're getting close Is you need to randomize everything because these little buggers will memorize things you don't expect Like I first wrote the simulation every sequence number started at one And I intentionally just coded in I took note all randomness out and I just said You know, I'm going to skip whatever the second command being sent is I'm just going to skip that and throw that away These little buggers memorized that state machine instead of a generic communication state machine They memorized that oh, okay sequence number three needs to be retran or sequence number two needs to be retransmitted and didn't really do anything else beyond that which was It's smart in their part. It's the minimum logic. It's technically correct But I asked at the wrong question. We had a I know of a cat That uh wanted treats and the treats were uncovered So it would stand there and you uh would open the door and it wouldn't move So it would get hit in the head as the door opened Well, the thing learned that if it didn't get hit in the head it didn't get treats No, the same kind of strangeness And he didn't learn what you thought it would learn so but when you started randomizing those sequence numbers and start randomizing the gap Between sequence numbers. So it doesn't go one two three might go one 20 2250 Start randomizing those then it starts to evolve more general purpose things because you didn't realize you were presenting it with Something it could lock on to At the same time you want to reduce randomness in your fitness functions This fitness will vary all over the place and you might accidentally pick somebody who did well this time simply because the dice were in their favor So you want to average things out. That's why we run things so many times to sort of average out the fit and average out the randomness We have to add to fitness Thread safe random numbers so you multithread this thing Make sure you're using thread safe random numbers. You're going to wonder why you get the same answer out of every thread And multithreading didn't really change things Yeah This was a fun one is watch what you're incentivizing as well So I told the attacker there's a there's a risk when you transmit somebody can hunt you down and they're going to find you They're going to come get you Well, the attackers figured out that the best thing to do was then to stay quiet and not attack So I had to give them a reward So I know earlier I said there's a risk when transmitting but to get the transceiver evolved that I wanted I had to reward the hacker for for doing for actually hacking Another thing is if you've got the computation power is increase your population size Most of the runs I did were population size four, which is very standard for cartesian genetic programming And I left it at four because we had to run it amplify it by you know, a couple hundred times for all the randomness and I've seen it over and over that if you double you double the population size it triples the runtime It triples the runtime But it halves the fitness which means you get half as many complaints You get a much better A much better critter out of the end of it I've got a detailed slide on that if we have a few seconds And dust off your statistics booked anybody remember what a what a t-test is You do all right the angel knows But I remembered that there was something about statistics prof griping me about that a long time ago But you've got to dust that off when you're looking at say 20 runs and you've got averages You're okay. Well, this one's 4,000 and this one's 2,000. Well, is that good? Say well, no with the standard deviations and all these bell curves They're We're the 50 chance that they're really the same population. You didn't really make an improvement So you got to dust off the old t-test which thankfully excel made easy for me to do Okay, almost there So without an attacker here's representative of what we had happened So fitness and orange So every generation fitness wobbles around every once in a while you get a you get a dip So I'm logging these every thousand generations simply because I really didn't want to draw 200 000 dots for I don't think the projector could handle it Anyway, fitness wobbles all around There is a slight trend to that fitness. There is a slight downward trend to that. You can barely see it, but it is slight And then every time you make an improvement you get a dip into this best fitness And you see that down here and every time you change best fitness you give a validation run and you see validation Like I said is space done wrong space bad boy as bad as it can be It does terrible things to our packets So that's life without an attacker Here's life with an attacker so So this 30 000 mark right here But where our fitness was there Average fitness is way up here off the screen. I had to trim it or we wouldn't be able to see any of the detail down here Okay, this thing does An attacker changes the landscape about generational fitness. It changes it drastically However Notice our best fitness is still down here in the 10 000 range And our validated fitness is still around the 30 000 range Still around the 10 000 still around the 30 000 range Which is interesting Which is very interesting to me We're co-evolving an attacker and it's clearly much worse than outer space I mean, it's clearly doing terrible things and yet we're still ending up With a pretty good product coming out of the end. So I thought that was very exciting then I asked Does an attacker help the process? It certainly it certainly changes the process. It changes what we get out because we see We see we have 50 percent more active genes in something that evolved with an attacker So it's a more complicated complicated program And when we apply our statistics tests, we do see that The best fitness coming out with an attacker This is technically a different number according to the old t-test These are a different distribution at first. I looked at that and like oh, well, okay. I guess attackers make things worse and But you realize the attacker is really changing the rules of the game Is adding a few extra packets is changing how you know, the the nature of the evaluation So it's not fair to look at a total fitness. You've got to look at the validated fitness Which is the run that's all things equal no attacker. It's just a really terrible outer space version We could do a lot of things attacker can but it's not as aggressive or intelligent about it Statistically these are identical numbers. These are the same distribution Now that's fascinating to me too Is that even with an attacker evolving with all these benefits? That a transceiver can still evolve Keep up with the attacker and still produce something that performs as well as if it evolved without the attacker So okay to me that's uh, that doesn't say attacker helps or doesn't help that just says the attacker changes things Now this is of interest too is if we look at the generational fitness We see that without an attacker the um Fitness is going down slightly The the validated fitness is dropping a little bit or the fitness is dropping a little bit So without an attacker things are getting a little better over time With an attacker our fitness generation to generation Isn't changing Isn't changing at all the fitness functions are not They're very poorly correlated. There is no trend here Which to me says the attacker and the transceiver are locked deadlocked As one evolves, so does the other now. I'm only looking every one one thousand generations So there's bound to be peaks and valleys in there where some of them are going to happen I'm not going to see that But these two are locked into an eternal struggle with neither one winning and neither one losing Which I find very interesting And yet with neither one losing with fitness not getting any better Over time We still produce just as well at our day job Okay We have the extra overhead to deal with the attacker and still deal with our day job And then If we look at say best fitness validated fitness Though the real criteria about how well things are coming out You know, what's the end product? We see some noise in here fitness wise. What's coming out of this thing? As we see these things have about the same lines The validated fitness and core and best fitness are coming out with about the same downward trend in both cases Except this is the beautiful part. This is the gray area morality The validated fitness at the end of the simulation runs and I had to do very short runs to get enough of them And done done the time for the conference But at the very short runs The ones with an attacker are improving their validated fitness at a double the pace Of the ones evolving without an attacker I find that an incredible morality lesson It says if you want to produce a communication protocol that at the end of your process is going to be really good You actually need an attacker to make that progress quickly Because an attacker does accelerate the progress beyond a certain number of generations It does improve your ability to to produce good work In fact, it outperforms the random space adversary we start with in terms of uh, in terms of challenging your your uh, your evolved code So can it do it? Oh, yeah. Oh, yeah. I'm very comfortable with that Um, is it robust? Can it work with poor signal quality? It seems to I'd love to see a perfect one evolve yet, but I will say that has not happened But I'd love to see it. I'm not sure if it is possible though. I'd need a little more instrumentation in the code Can it work with attacker? um To paraphrase our team's logo hell, yeah Um because it holds its own with an attacker. It doesn't lose ground. It doesn't gain ground, but it does hold its own So to me that says you should You should evolve your control logic with an attacker And with a minor poor signal quality case challenge both of them just in case And that as long as you're willing to keep evolving your communication protocol, you can keep up with an attacker Interesting experiments the future would be to run would be to pause that to freeze like set a standard for the communication protocol And see how just quickly an attacker can overwhelm it To see how mature you have to make protocol before you freeze it So future work push this thing onto a gpu a lot more computations a lot more at a time Especially the worlds make our chromosomes finer so we can take more advantage of the genetic part of genetic programming We need a little better a different selection technique than just choosing best fitness because I have the feeling I just have the gut feel that there are some good Good individuals sitting out there that the attacker is really challenged. They just haven't shown up yet So i'd like to examine those get into the whole notion of islands so competing islands and pit them against each other freezing attacker transceiver And adding counter measures, which I think would be a particularly exciting thing And even counter measures to the attacker to see if somebody's trying to counter its work That is about the end of my presentation. So I thank you very much for coming out tonight Shameless plug join us work on this if not Um, you can go get the code A little later tonight from this url up on wordpress And I recommend some extra books here that I find very interesting this one here evolved to win is free Fascinating not necessarily cartesian genetic, but it's a fascinating read on a gaming strategies and I I think all of this has been Very exciting very exciting for me And I look forward to seeing what you guys can do when you take a communication protocol engine and drop it into things dynamically So thank you very much. And we'll take a few questions And please remain seated till we finished and he has some more t-shirts to give out Yeah, so the first question comes already from the irc The one question is how do you did a debug an algorithm generated by this? Very carefully You usually you I print them out I print them out. You saw some of the photos here the You know, I might print that out to trace trace through that by hand But in general you need to run it through the simulation As long as we're waiting I'll toss up a few other images So here is a packet received program that was evolved for the transceiver and here is an attackers program The attacker gets pretty vicious All right, that was a good question. How do you debug this and you really need to trust your simulation? You do some you do some tests. You do some test writes Maybe remove randomness Can't give you a t-shirt. Sorry. It was a good one though You need to come down if he's here. Okay, next question. I think was here I have considered that there might be more than one attacker at a given time You could have The attackers punished if another attack was better than Give him an attack. No, I've not played I've not considered a community of attackers I presume that the attackers would pool their resources for cracking keys as opposed to launching multiple independent attacks However, the system being chromosomes with an attacker just being a chromosome You could usually launch as many of those as you need and add them to the system That would be very interesting to see if multiple attackers can actually swarm it That would be fascinating. Join me download right join Where that's why you do it? Yeah, go ahead. I was wondering if you had tried your Generated attackers against your manually created protocols from your initial attempts No, I have not The code bases are so wildly different The manually created one actually has fairly poor support tools around it So I haven't been able to really fit that in. I'd love to though Next question that was great. I love that one get this back to you. Oh, yeah, I will when I'm in the area, I would say How to t-shirts sorry Oh You mentioned that power is very precious on the rover. Yes, and obviously The complexity of the circuit is going to be Proportional to the power usage presumably And that the circuits with an attacker about 50 percent more complex What your thoughts on that trade-off and is there any scoring in there based on complexity is a necessary evil We have to we have to plan on at least At least one governmental attacker on our mission to the moon Large resources I think it would be It would be irresponsible not to plan on at least one attacker, you know, taking or taking a run at it. So it's a necessary evil I wish I would love to cut the resources down, but I no luck More questions. There's one here in the back Do you penalize code complexity in the ah That is a that is a common thing to do in Cartesian genetic programming is to Is to count the number of active genes against as a penalty And it's been found through other experiments, you know in the books I've read and such or that You don't want to do that until you've achieved a perfect execution or near perfect execution So I have a provision in the code to say if you ever execute perfectly all data gets through perfectly um no doubles no nothing then to um To include the complexity as a penalty, but don't kick that in prematurely and In the before the attacker that would happen that would kick in After the attacker hasn't happened yet But it is important to it is an important tool to have in there a simple little if case it's easy to add You're involved evolving the attacker in the communication protocol together. Yes. Um, that does mean that A later evolution of the communication protocol can be um attacked by an earlier attacker because The attacker when you are playing the evolved version of the attacker against the protocol So maybe a earlier version can attack it Yes, that is that is a potential risk is that an earlier attacker would have A different algorithm the attacker gave up on and that the the transceiver is now vulnerable to And I think perhaps the suggestion that was up here of trying multiple attackers Would help address that potentially saving old versions random randomly sampling old versions the attacker and reintroducing them into the population would help but um I don't want to do that until I get this ported to a gpu. I have to be pragmatic, but that would be That'd be very helpful But yeah, it's a vulnerability More question, please raise your hand so that I can find you there's one one one one, please Anyone that's asked questions or just hasn't um, I do have a little swag some pens from nvidia and some part-time scientist stickers We'll see me afterwards. Well, we're uh driving around. Yes. Okay. Um, so When do you want to? Obviously some of the calculations you can simplify them and it's pretty easy It would be pretty easy to recognize certain genes as Possibilities for simplification, but would this affect the output if you simplified before too early in the generations? Is what I'd like to say Yes Yeah, it turns out bad you you simplify Let's say you simplify this no op Okay Remove this no op entirely and just route this one over to here and remove that gene entirely Now you've removed the ability to come in and mutate that to say a negative Or a different operation and that does seem to affect the Cartesian genetic programming You almost you want to leave in the bloat? For as long as possible and only optimize at the end when you when you harvest Because it really does seem to affect the run the reliability Could could it be possible also to run the same process in like kind of a map reduce environment? It seems like it would be possible Yes, that would be the islanding which would be to uh be to run Hundreds of different communication protocol simulations may be starting from different random seeds Separately and then see what the best one is another one might be to Take the different worlds you construct and then farm them out to a grid or a cluster And have the have them executed remotely and come back The the julian miller who invented the technique He would take he would take these and compile them to c code And then route that c code to nvidia cuda cards on dozens of computers across the lab No, you're running a bit out of time. So is there one very very important question now missing No, then I would prefer to end the talk now and you can talk talking with him a bit later on