 Good morning everybody, welcome to Saturday Lightning Talks. We're just going to start up in a minute and just to give an answer, we are in need of volunteers for all areas and if you think you have some time to volunteer, please head up to the volunteer's end after the Great Lightning Talks, obviously. And we will use task-tuning AD or odd judge or something. Okay, so first up we have go to the speaker here. Okay, so last up we have go to the chair. And all things under a muller, you must start now. Okay, hello everyone, this is my android muller and I'm just going to show it to you. If you'd like to find stuff, some technique that you can use to identify mulling at runtime, which is quite different as to how we normally do it. So these are just some headlines. I'm in android space and it's not just a couple of infections here and there that runs in the scale of millions and hundreds of thousands. If you own an android device, you probably have been affected by this at some point. If you think you haven't, then you just don't know about it. So typically we look at mulling in a couple ways. I won't go into the technicalities of these, but generally these rely on some sort of analysis of artifacts, application styles and APK, we look at signatures, reputation, one of my favourites, which is kind of that screenshot on the right, which is a free torch app. And generally we say it is for free product. So I switch on the app for a lot of these apps that are saying hey, this is free Pokemon Go or free Monero money that's probably going to end badly for you. And then memory forensics which is quite common, but that generally happens after post infection. So what are the shortcomings with this one? If you've delved into evasion, static analysis is hard, so either you have to be an armed expert or know delved into hot codes or know that android runs on it quite well, which is quite hard. You can't know things like cuckoo on your phone. But typically the current analysis techniques only show you a very small subset of what the malware actually does. Because malware is really good at hiding what it does. And at the end of the day, static analysis won't show you 100% of what you're going to look for if you want to see a nasty piece of malware. So we want to look at the memory at runtime. This is a bad Linux stroke in a way but if you really want to torch yourself a little bit of a thing called proc.png maps, that's real memory lists for a particular presence of Linux. Android is Linux. And if we want to ourselves we can look there for objects on the heap. And this technique basically what we're going to do is look at objects on the heap. Because every piece of malware makes use of objects they're not making use of all parameters, if they will it would be cool but they're not. And we want a way to look at what objects are essentially a run sample particular process, other weekend things like proc.png maps or 5GDB and look at it quite manually. Or we can use an awesome tool called Frida. If you're not familiar with it, the higher-up when you look at it is a great instrumentation framework. And basically it allows us to look at a process at runtime while it's actually running on the device. And you can look at everything from system calls and more interestingly looking at the memory of a process. So for example a common technique is to do backward applications which is something called detector. It's quite funny if you want to troll your friends if they are not from the app store. And you want to look at two kinds of things typically a dex password or a TCP connection. You want to basically look for does this app inject additional functionality at runtime which is a great common technique and does it establish some sort of outbound communication. 90% of the time while we will make use of these two techniques and this is often missed by static analysis because in functionality that is imported from dex password you will not see the static analysis. You have to actually work at runtime and to see this actually happening. So I was going to do a lot of demos and I was lazy and brought some links here to some videos if I can remember how to compute it. And I think it just did it there also magically. So basically what's happening here, we're just going to do a standing connection. This is nothing new. This is typically what the evil completable look like. And what we've done over here is we've backbooked the Twitter application with that thing I was talking to you about earlier called interpreter. It's the general application you just backbooked. So function as Twitter and at this case this just shows us we have a session so remotely we are controlling this device over here and from my attacker machine I am going to take in a moment a screenshot of the application and get the person to password and this infection makes use of a bunch of objects to actually perform this kind of functionality. This is my evil machine over here and if we open up that picture we will then see the screen of the device that we had infected. Now that's all fine and dandy and not really that interesting. Been around for quite some time but some of the issues that we have is highly analysed this malware to see that it's actually doing that. So I asked myself that question and let's see if I can computer again for another minute. There we go. So we've got the same infection and also I'm going to call 8k at the end of the minute with dutch off the console you know what I mean. And what we do now is we look into the process. So in this case I'm analysing the system these are system processes running over here. I've built a dutch client for android. I've been very committed with dutch I appreciate some help on that. But we're basically looking into the process of the application and we're going to say give me all the objects that this process is using and from those objects I can then look and see which ones are evil. Why? Because some of these objects you can't analyse statically. You have to see them on the heap. So in this case the true application that we're going to look at has the PID of that and that's the application in the back door. So it is behaving like malware. And basically what happens is with this very very ugly output as you can see I'm not a UX designer of sorts but we've managed to hook into the process of the malware and identify there's a way you can use a DEX cross loader and that DEX cross loader at runtime has instantiated some TCP objects. This can go further into maybe your UR overlay attacks and a whole bunch of other stuff which is really cool. And we're saying that since you would miss this functionality unless you got hold of the DEX code that was invoked by the cross loader which you don't have when you get ADK. Normally it's remotely downloaded and invoked. So that's a lot of fun. Once again that's one of those machine apps I'll show you. What are the future plans? Well at the moment this works really well on ART and in Validek but of course we are relying on Frida which is really cool but it's quite unconstant because it's using debuts to run on the demon. So what we're actually trying to do now is actually analyse the heap allocation tables and this works really good for the Dalvik virtual machine because analysing objects is actually really easy that it measures things. But ART is a different story because it uses something called JDMaloc which I have little to no experience with. So if anybody knows JDMaloc you might be my new best friend. But definitely we're going to actually move Frida and actually bundle this into the operating system. We've done this, we've merged this into the AOSP with our own custom builds and actually use it as a runtime for our scanner basically. So you just say on your phone, hey this app is acting a bit buggy. Tell me if it's acting buggy and we'll go ahead and tell you, well yes this is looking quite buggy. And that is me for the other 10 minutes. That's the first one that's ever happened. I need more hands for this. And is the computer a new person here? You know, you're meeting with such a science and industrial engineer. Thank you. Good morning everybody. I'm Chris and I like cooking and I also like making things. So this is a short talk about something I made a few years ago, run to be pie controlled sous vide water. So sous vide is the name for a booking technique and it literally in French means under vacuum. And the vacuum part of it is probably the least important thing about the technique. So the idea is you put food into a vacuum packed plastic bag and the plastic bag is there to stop it from getting wet. Because you then put the vacuum packed plastic bag into a water bath and the water bath is at a precise temperature in order to cook the food as you want it to be done. So you don't actually need a fancy vacuum sealing equipment like you see on the left hand side which professional chefs might use for this technique. You can actually get away just with a zip lock bag and something in the air out with your mouth or a straw or something. The only reason why you need to get the air out at all is to stop the bag from floating in your water bath. And you might also if you're doing kind of long cooking worry a little bit about oxidation if you left a bunch of air in the bag along with the food. So the purpose of the sous vide technique is to have precise temperature control. And especially when we're dealing with proteins it's about making sure that we did nature just the right proteins. So most cooking is actually technically when you get down to it all about either breaking down long chain molecules or persuading short chain molecules to join together into long chain molecules in order to have an outcome. So if you look at the six different examples of eggs here on the screen then each of those is only a few degrees set the greater part. So going all the way from running wine and running yolk through to essentially a hard boiled egg is a handful of degrees for each step. And so you can go from everything runny to just the yolk runny to things starting to firm up a little bit and eventually all the way to a hard boiled egg. So sous vide is one of the techniques that's covered in this excellent book that I kind of pulled up here, Cooking for Geeks which is an O'Reilly book. And all O'Reilly books are great but this is one of my favourites. And it's kind of not a typical O'Reilly book in being about a programming language or a framework. It's kind of there to say how science works in preparing food. And so as you go through the book it's got lots and lots of different techniques in there that I use for denaturing proteins mostly and sous vide in there as just one of them. So to do accurate temperature control in a water bath in order to do this sous vide cooking we need some kind of control system. So our input is going to be temperature. We need to be able to measure the temperature and measure that temperature reasonably accurately. And our output is going to be a heating element. And in the middle we need some sort of control system. So we measure the temperature and we turn the heating element on and off in order to get that temperature of the water medium to be exactly where we want it to be. So the thing I put together about five years ago now uses a thing called a DS18B20 temperature sensor. And specifically it's a one that's immerseable. So you can see in the left hand picture here, most of the picture is the Raspberry Pi with the little daughter board on top of it for the bits and bulbs I put together. And just on the right of the Raspberry Pi is the immerseable temperature sensor. These things cost about a quid on eBay and they're interfaced using a protocol called a normal wire. And so a bit of what you see on top of the Raspberry Pi is just the pull up resistor and the three wires that run from that sensor. So it's got 5 volts ground and a single data line that's pulled up with a little resistor. So that gives accurate ish temperature. And those things output to about a resolution of an eighth of a degree. And so that gives the temperature starting point in terms of the input for the control system. The right hand side shows where I did the water back and this was an old slow cooker. And you can see the little bit of Subaru holding the old control system on the front bit together. Slow cookers do everything that we need here in that they've got a heating element and they can contain water. What they don't do is anything like accurate temperature control. And so it's got three settings on it there. It's got high low and warm. And basically all of those will boil the water inside of the slow cooker at some kind of ferocity. So if you want to cook something at 55 degrees, just turning the slow cooker on and putting it on to warm won't do that for you. So the middle of this whole thing is the control system implemented on a Raspberry Pi. And it's running a bit of Python codes to implement a control system known as PID, which is proportional, integrating, and differentiating. So the output is taking the temperature and it's deciding how much it wants to turn on the heating element according to a proportional relationship with the temperature difference between where it is and where you want to be and integral of that. So if you've got a big gap between where you are and where you want to be, you want to put more temperature into the slow cooker. But you also have a differentiation serve in there because as you approach where you want to be you actually want to ramp down so that you don't overshoot the temperature that you want to be at. So that's all just implemented in a bit of Python code. And what's actually going on here in terms of output of that is 433 megahertz remote control socket. So Maplin used to sell these things when Maplin was still alive. And somebody had already created a Raspberry Pi library for that called Raspberry Pi Strobe on and off which took care of turning the remote controllers on and off. And the reason I did this was Raspberry Pi directly to mains electricity to turn this slow cooker on and off is kind of dangerous when you're messing around with things that are wet and things that are hot. And so I wanted something that was inherently safe in the kitchen environment. And so those off the shelf remote control main sockets are pretty good and it provides a huge isolation between the Raspberry Pi itself and all of the hot wet stuff. Anybody that's ever done anything with serious real world control systems will know that control systems can be tricky. And so the top chart here is an example of an early run with this thing. So I was trying to get the water bath at about 56 degrees to cook a steak at about medium rare and you can see that it wound up there and shot across 60 degrees reaching about 62 degrees. So that's the steak ruined already. And then a few minutes along you can see that there was some kind of error in the control loop and it went away to over 70 degrees. So that was the steak properly ruined at that point. And once that error was noticed I kind of manually switched it off and the temperature just hit back down again. The lower chart is a better example of what we're trying to achieve here. And so in that example I was aiming for 60 degrees you can see that it wound up quite rapidly to almost 60 degrees. Then just bundled along with a little bit of oscillation. It's almost impossible to get all of the oscillation out of the control system. But you can tune it to get that minimized. The remarkable thing in the world of machine learning and artificial intelligence is that these things still aren't auto-tuning. So we can try and fight spam but we still can't control the temperature of a crop pot. Reverse engineering can also be tricky. So my mapline remote sockets, two of them died and now you can't buy stuff from mapline. So I had to reverse engineer another one a few weekends ago. This is the output that we get from some diagnostic software for remote control commands and I've had to use a platform called PiLite to re-engineer the system to replace strong on and off. But perfect brisket at the end of the day made it all worthwhile and not shown here the amazing gravy that you get from all of the juices that you get in the bag when you could be with this technique. Thanks for the time folks. Okay, on next we have the Quora Dojo talk. Hi everyone, my name is Richard Haylor. I work for the Raspberry Pi Foundation. I'm here today to talk about Code of Dojo. First of all, Chuck Hans, if anyone heard of Code of Dojo? Oh great, fantastic. He's been to a Code of Dojo. Who is a mentor or volunteer at Code of Dojo? That's not so good. Maybe after the end of it I can persuade you to do that. So for those who don't know what is Code of Dojo. The key thing about Code of Dojo is it's free programming clubs for young people aged between 7 and 17 running local communities. The idea is like all the coding clubs that you sort of hear about like Code Club Raspberry Jam and those kind of things. It's places for young people to go and learn more about being creative with technology. Code of Dojo was founded in Ireland in 2011. The first Dojo happened in Cork in Ireland and since then there will be 2,000 Dojos around the world in more than 100 countries. Actually getting really accurate figures is quite hard but we reckon about 58,000 people around the world actually each year benefit from Code of Dojo. Coming to a regular club where they can learn more about Code of Dojo and coding. One thing you might see on the side is the word Ninjas. In Code of Dojo you can be kind of adopted the Japanese martial arts. The young people who participate in Code of Dojos, they're called Ninjas. It's an open source model. The whole thing about Code of Dojo is you just take the idea which is primarily free coding clubs for young people and you turn it into what you want. So one thing we really encourage is people to hack our logo and add it. That open source model really means if you're interested in anything to do with technology and coding, when you fancy helping young people learn about it, you can take Code of Dojo and start with Code of Dojo and teach those young people what you think they should know. What are the benefits for Code of Dojo? First there's the obvious one. You're learning to code. The national curriculum in the UK which was revised in 2015 is a lot better now in terms of actually teaching people programming skills rather than just the old fashioned ICT where everything kind of revolved around PowerPoint. But there's still, we hear from young people all the time that they don't get enough real programming lessons in the schools they have. My son's a primary talent for that. Every computer lesson becomes home in moments that he didn't really do anything. Isn't that right, Jasper? Yes, good, thank you. Good luck all of you to participation there for your own family. It's also a really social event. Code of Dojo's are then some people think it's going to be a really dark room with lots of pasty kids sitting around not talking to each other. It's not like at all. They're very vibrant. There's a real buzz in the air and lots of mingling and people getting together and talking about things. I took my neighbour, my neighbour's son to Code of Dojo a couple of years ago. He's a great, super creative they're really musical and really arty but they're not really deep so they're not really into coding and that kind of thing. So when he came to Code of Dojo he loved it and the comment he made to me on the way home was it was really great to spend time as enlightened people so that's the kind of social thing that Code of Dojo offers young people. It also offers them an opportunity to be really creative and to build things Most Code of Dojo's will start off with some kind of pre-configured activities where you'll learn some basics like maybe lighting up an LED with an Arduino or doing some Minecraft acting on a Raspberry Pi but then it's really open-ended and the young people are encouraged to build and make projects that satisfy their own desires. Then we have this thing called Coolness Project which is an opportunity for the young people to get together and share what they've built. So Coolness Project International happens every year. It happens for the last three or four years. It gets bigger every year and you can see on the picture here it's in the RDS in Dublin and young people from Code of Dojo's all around the world come to show off the things they've built over the last year. There are lots of product categories so there's a bit of a competitive element to it I was lucky enough this year to be a judge, excuse me, my teacher and that's an amazing opportunity because I got to see lots of the great projects that young people have done It is a huge thing. I've never been to Dublin before this year. This is a picture I took from the front stage. The scale of it is amazing 600 projects, 950 young people, all into coding all into being creative, coming together to show off what they've made. I was a judge, I was judging the evolution category which is kind of the random thing where it doesn't fall into any other obvious category and it's a bit advanced. So that was great to see a lot of the things that people were doing there and this is the winner. This is Andre. He came all the way from Bucharest with the mentor who runs his Code of Dojo, Romania and what he built was this cycling thing. This movie is going to work. This is the movie of what he built I took on my phone basically it was a cycling belt so he put some Neopixel LEDs into his belt. He had an Arduino custom PCB that he'd made with the help of the mentor and he'd written an app for his phone so that he could control this belt as he cycled along. So he could do things like pretend to be a police car by having some nice flashing red blue lights he could do indicators, obviously slightly more useful to help tell people which way he was going and he doesn't show it on this movie but he could also if he had a bad experience with the driver cut him up he could present a nice friendly message to the driver perhaps a woman would not to become so close to the future. How many of you have slides? I was just kind of blown away by Andre. First thing is he's nine years old so this is a project he's built he's had loads of help from the mentors there and sometimes people criticize Code of Dojo and they say well this nine year old he didn't do the etching of the PCB himself or by himself well he didn't know a mentor helped him to do it. The important thing for me is that he now knows that that's possible and he sees that as something that he could do in the future maybe by himself and that's what Code of Dojo for me is all about it's about giving young people the knowledge and the confidence to go away to build things for themselves and to see beyond their sealed up iPad that they can't really open because it's glued together. The really important thing about Code of Dojo is that just like EMF it's all powered by volunteers. The people who run the sessions with the young people, the people who arrange the logistics, who do the ticketing, they're all volunteers we have a huge, the impressive volunteer community in Code of Dojo who help share resources, share tips and ideas and of course get together for social events around all these projects but really my main call to action at the end of my talk is to just encourage any of you guys here if you fancy helping young people learn to be creative with technology then have a think about whether or not you could help out at a Code of Dojo there are loads of them in the UK and in Europe, if there isn't one near you perhaps you could start one up. The process is really simple, you decide I'm going to be a champion at Code of Dojo you find some other people to help you, find a venue in the UK libraries are a really good venue for Code of Dojos we've been talking to lots of library groups around the country, we're keen to get more young people coming into the Dojos find your Dojo plan that you're going to do at that first Dojo and then promote it and we have a Code of Dojo website so you can do ticketing and all the promotions to help attract young people to come to the Dojos and to be honest, no Code of Dojo in the UK is under subscribed, they're all over subscribed because the demand for this kind of thing is really high that's all I had to say, this is how you can find out more about Code of Dojo the Code of Dojo.org website, if you want to sign up to be a volunteer Code of Dojo.org. That's me, you can email me anytime if you have more questions about Code of Dojo, you can follow me on Twitter or follow Code of Dojo on Twitter or even look at our Facebook page Thanks very much for listening. Next up we have the augmented reality battle game just a quick request for more volunteers, especially to help out with lunch so if you're free now, we would love some assistance Ian, I recently started as a computer vision engineer at a company called Retro Properties in Bristol so I thought people might be interested if I can talk about it but before I talk, I'm going to let it hopefully talk for itself so that guy was Mechamon, one at the front here he's our main toy product at the moment so we're a fairly mature start, we've been going about 4 years I've only been on the team 5 weeks so don't ask me too many in-depth questions because I won't be able to answer him but the thing that really drew me to Retro was the fact that it's quite a progressive company and it's kind of a company where we really want to get people inspired we're all really enthusiastic, we love robots and hopefully that's what I'm going to get across to you today so Mechamon, this little guy here, four legged robot each leg has 3 degrees of freedom so he's fairly nimble, he can do little flips, he can write himself hopefully although he's not managed on the grass so well and one of the things we're trying to do with this is not just have a robot that you drive around people will be able to play games with each other so we're working on if you've got two of these, you can back them together or if you've just got one we're currently working on an augmented reality gaming app which is what I'm really here to talk about because that's what I do so this is a fairly old demo of our original augmented reality game so you can see you've got your Mechamon at the bottom here and he's fighting a virtual opponent basically it's just a case of defending your base and we've got everyone asked about the Metroids game at some point so this gives you an idea of what we're looking for, we want to control it with the phone we want to put it in your living room and be able to play with it so that's cool, that works really well and that's already there so why do I have a job? so there's something on this image and something on that video that is the reason I have a job I don't know if anyone can spot what might be causing us problems with this current way that we're doing it, any ideas? shout at me what about if I do this, does that give any more clues? so what we have, the only way we can track the world with the original app is to have this special map in view of all times and that map is only about one meter square which means that we're really limited on where we can drive the robot, what we can do, how we can interact with your space and so moving that into something where we don't need that map is where I come in the other problem is, and it's a bit more of a physical problem is we have a robot with grippy legs so that it doesn't fall over and we have a map that's not stuck to the ground and the robot has to interact with the map there is a clear problem where the robot runs on the map, moves the map and essentially our entire game will lose so what we're currently working on this is, apart from you guys, only a couple of people have seen this video so it's very much a work in progress is using new markless AR technologies that are coming out on the new Android phones and the new iPhone that allow us to build up a model of the world and embed our stuff in it so here we have a little virtual mechamon our guy is the silver one and he's fighting the gold one and I have a working demo of this on my phone so if anyone wants to play it later feel free to come bug me and I've also got a couple of mechamons with me and the idea is that we can move around your living room we can play the game and we can embed the scenery so it's kind of cool and it's kind of working there are still a lot of challenges so my background is computer vision and the biggest challenge with this is we now know where your living room is, that's great but we need to know where your robot is and we can kind of see things that look like they're moving around but if we want to put some of those cool effects on it like we had on an earlier video I need to know exactly where the head is I need to know where the legs are I need to know how I'm moving I need to make sure that I'm not putting my robot into some scenery that we've created and I also need to know that that little gold robot isn't about to walk straight through a plant box it kind of ruins a whole illusion so we're putting together techniques like for example we've got a nice shiny blue head that's a pretty good feature and then you've got a blue carpet so then what do I do? so I'm currently planning around things like deep learning and neural networks to try and model what the robot looks like but it's still kind of early days I'd say it's early days we're launching this in about a month so it's early days but I'm not going to sleep very much for the next month so the other thing that I just wanted to talk about is as I say the thing that attracted me to reach was the fact that we're trying to encourage more people into robotics which I made it exciting I mean robots are kind of inherently exciting but we want people to be able to take part and play with them in a more interactive way so one of the things we do is we're working with schools we're working with universities and we're trying to run internships to bring people into the fold and encourage them to do stuff with the robot and to that end we're working on a visual programming language so people will be able to use a kind of scratch like interface to make the robot play around the other things we have got which have to do with mine oh yes of course so we're also putting together a RoboCup 2019 platform so hopefully come RoboCup 2019 will we be involved with that I think that probably covers most of it I think I've also raced through in seven minutes until it's done but thanks very much I've got two of these guys with me to play around with okay and now for the final winding talk of the session is artificial intelligence in brainfuck Hello my name is Tim and I have a website called midsile.com I spoke with Nex and I'm going to talk about artificial intelligence in brainfuck just a very quick overview I imagine most people are familiar with brainfuck but it's a very very simple programming language it was designed not to be practical but to be fun and it's very very simple it's only got eight possible instructions that's eight characters that are valid I mean it's a little bit like programming assembly language but even in assembly you've got arguments and addresses and you know the op codes they're quite large 16 bit or more and so in a way you've got 65,000 possible instructions if you've got 60 bit op code in brainfuck it's literally eight instructions that you possibly use so you can fit onto a paper tape three bits wide so the instructions are we've got one big address space and one pointer to the address space and the first instruction is increment the cell the pointer is pointing to and the second instruction is the pointer is pointing to and the next instructions are move the pointer to the left and the pointer to the right the dot and the comma you're in for an output so that's the value of the current cell it's normally one byte so the value of the current cell printed a standard output to the terminal or whatever and the comma is take one byte from the standard input buffer and write it to the current cell and if there's nothing in the buffer the brackets are controlled logic basically all of the logic is within these brackets which the opening bracket says if the current cell is zero, jump ahead to the corresponding closing bracket and if the closing bracket says if the current cell is not zero jump back to the opening bracket that corresponds to it so the effect is the code between the brackets runs until the cell pointing to the ending bracket is zero and of course it could be nested so that's the language basically and I wanted to write something in this very few people write anything in very quick because it's ridiculous but I wanted to write a useful program there's a lot of programs which like these walls of text that I think they were actually compiled to very quick which is still an impressive achievement but it's not quite the same thing as writing an entire program in it and so I said it's artificial intelligence, it's not machine learning, what I wanted to write was a computer opponent to a game and the game I chose was tic-tac-toe or lots and crosses so this might sound trivial but it's not even this is surprisingly difficult so very first thing I did was try and make the user interface so the program is going to print to the terminal a little ASCII diagram of the board and then we need to take input from the human and then place an X in a little ASCII diagram then make our own move, place a naught and then pull the board again so just that very first bit let's start with the choosing a number so if you just type in the number between 1 and 9 and put an X there that should be fairly simple but even that you've got to take that fight of input and say was this between ASCII 0 and ASCII 9 and so I wrote the program, I don't really have time to explain it, it's not very clear at all I mean this is what most rainbow programs end looking like, all of the text that's readable is just common because everything else gets ignored this does technically work but it's completely illegible, the bit is doing a comparison you have to basically destroy the value you're looking at so you always have to copy the value somewhere else put, you can copy the value somewhere else it's difficult so this technically works so in this particular case you can consider this like a module because we know how much memory it uses, we know where the pointer is at the end of it and in that case we can just kind of like pump it together and drop it into a larger program but to write this all I did was just kind of fiddle around with it in the interpreter which for something any more complex than just saying is this greater or less than a number isn't scalable so the actual program well okay so we need to decide how we store this board in memory and you might think okay well you've got three possible states per grid location so it could be empty, it could be an X or it could be a 0 so let's just have 0, 1, 2 in nine memory cells but as I just explained doing comparisons is really hard so it becomes very very tedious, I did try and write a program like that and it didn't go well so I started over let's assign lots of memory as bitwise flags just take the whole cell and say it won't need to be a 1 or a 0 then we can use our brackets to do simple comparisons if we know it's ever going to be a 1 or a 0 the code becomes a lot less verbose so we've got a number that the user is typed we've confirmed it's between a range of places of memory so if you use three cells per grid location just a flag for yes it's empty or a flag for no it's an X in it or a flag for it's got a 0 and now we'll have to do an indirect jump and this is how I did that this is, I think this is a rather elegant bit of code, this is keep documenting the current cell and opening a bracket until until it reaches 0 of course and then move three spaces across for everyone those numbers that we've documented by and so this was perfectly so now we're somewhere in the array we can check oh yes this cell is actually occupied so go back to the choosing number routine or we can mark it as an X but now we're lost because we've done an indirect jump we need to know how to get back to our home position so well I suppose we could do like some kind of linked list or something but it's going to get very complicated so what we came up with was putting markers in memory so if you consider something like this what we're doing here is we're checking that some code will run if the value of the cell is 1 so we decrement then we do the is it 0 oh always the value is not 1 I suppose some code the point is by putting a plus it needs to be after the bracket and then doing the same on the closing bracket of minus then plus we leave the cell unchanged so we can run this on any cell and whether or not that code runs the cell will have the same value at the beginning so we can do something like this which is it's a little bit like a glider in the game of life demonstrations what this code says is keep going left until you hit a minus 1 value because I've swapped the plus and the minuses around so I chose minus 1 as like this special value that will only go in certain places in memory so after we've done our indirect jump across we can then run back to the minus 1 value and know that we're at a known location so I use this quite a lot in the program I've just given an example of one of the bits that we're doing so this is a test to say has x1 this is one of the tests to see if x is 1 this is we move to the start of our array we then move across by one to say we're at the x flag then we'll say is the first cell an x is the second cell an x is the third grid location an x and if so then we run the two lines in the middle there which is run back to our reference point move a certain position to a particular flag that we've assigned as x is 1 and set it other and then run back to where we were before because we've got to do a whole lot of other comparisons as well and we don't want the program to break so this sort of bit of code is repeated then with all the verticals and the diagrams and to say that x is 1 and here's another example of that this is how is it a draw so we can say first we set a flag to say yes the board is full then we go through every single cell and say is it energy okay so there's a certain elegance to that but I'll skip ahead to the demo which is I know I haven't really actually talked about the logic of the thing but this is my finished code it's all in github and talk to me afterwards if you want to learn more about it but here's an interactive demo so I've got my little ASCII board there and I press I press 5 and I put next in the middle and the programs inside put a thing over there and then we can press 2 and it's blocked me and then I don't know let's go for a 7 6 8 and then we put I feel free to play with that that's I'd like to talk more about the logic of the program but I don't have that time this fall so yeah that's it thank you okay thank you and just once again can we thank all of the speakers today