 by Vincent Warmerdam. So hi everyone, thanks for having me over. Buenos dias, me gusta estar en Bilbao. I'm going to talk to you guys today about the joy of simulation. My name is Vincent, I'm from Amsterdam, and what we're going to do in the beginning is I need you guys to get out your laptops and go to this one website. While you're doing that, what we're going to discuss today is what randomness is and what it isn't. Then I'm going to explain to you guys how sampling can actually be used to, you know, do a bit of inference, which is nice. I will then demonstrate a couple of experiments that I've done with sampling. So I'm going to explain to you how I derive some better tactics for monopoly using simulation. I will explain to you how I found out that you can sell LEGO minifigures in eBay for a bit of profit. I'm going to then talk about how sampling can be used as an optimization tactic and I'll conclude by talking about how we can outsource creativity a bit by using sampling and then I'll talk about some Pokemon related subject that somehow blends everything together. So, randomness. Before talking about what randomness is because we're going to be sampling, we should be sure that we understand what randomness isn't because, you know, we're humans and computers nowadays tend to be a little bit better at understanding randomness than we are. So if you could all please go to the website that I've just told you about and we're going to go ahead and do a bit of an inverse Turing test. So this would be the website. And then there's this one blog post called human entropy. Please go there right now and you should see a website that's somewhat similar to this and you could read it but the idea is we're going to go ahead and try to generate random numbers. So put your index finger on the one, put your other index finger on the zero or use these two buttons. You will notice that if you click the number will increase. And let's just go ahead and do this and try to generate them as randomly as you can but let's generate about a hundred of them. I'm going to go ahead and generate just a few more and I'll give you guys a couple more seconds so you can do the experiment yourself. So I've almost got about 200 numbers and you can see the JavaScript slowing down. Hopefully it's not too bad for the Wi-Fi. So I've just generated a bunch of numbers. I as a human said, okay, let's 001, 100, 001, 110 and let's see what I've then done. If I scroll down what I will then see is I will see all these histograms of how often I picked a one and how often I picked a zero but also how often I picked a zero after a zero and a zero after a one, etc. etc. etc. And what you notice is even though I'm trying to be kind of random, I'm trying to make as many ones as I am trying to make as many zeros, you will notice that I usually fall into this pattern where I do a one after a zero and a zero after a one and it's very normal as a human being because it feels random but it probably isn't. And this small web app, you know, you can read up the map if you want. It tries to do a real-time prediction of what you're going to type in next and you can also track how often, how good the accuracy is. So if I just reload the page this will be more of a real-time thing. So 001, 110, 001, 110, etc. etc. etc. Not random at all. And then at the bottom you can see you know, I like this idea of human inference because in a way this is an inverse Turing test. By checking if you can actually generate random numbers I am actually able to say that you are definitely not a computer. Anyway, so this is a sort of way I hopefully will quickly explain to you guys how randomness works and how it doesn't work. It is useful to have some form of randomness available to you but you as a human simply are not good at generating it. Therefore we're going to use a computer instead. Another sort of cool thing if you're interested in playing with it. I'm just going to do 001 just repeatedly one after the other and you see that there's this estimated or tries to predict what I'm going to generate next and you'll see that at some point the probability of me getting a predicting a 1 is, you know, first it's a 1 then it's a 0 and probably you switch. But if I now switch my algorithm so I'm only going to generate 0s now for a while it has picked up my new pattern and the accuracy goes up again and if I do only 1s now you'll see the same pattern as well. The cool thing about this is because I have these laws of probability to my disposal I can use a little bit of math to do all of these predictions but it's still useful to have random samples. So after this small demonstration hopefully it's obvious that human entropy generally is quite terrible. This is why we prefer to use a computer to help us think about probability and because we have this computer available to us quite fast we can kind of avoid doing a little bit of math because, you know, math is hard and even though it is very useful we do like to just get the job done so the goal of this talk is to convince you that you can do a lot of these tasks just by getting samples instead. And I guess the easiest way to explain sort of from a modeling perspective why samples are useful sometimes we know the characteristics of a system but we like to know the likelihood of a certain event happening to use sampling instead of maps to do the inference for us. And the simplest example I could come up with is suppose you have a lot of dice you roll the dice and then there's a probability that a certain number of eyes pop out and I could calculate that I mean, you know, there's laws of probability instead what I could also just go ahead and do is I can draw like draw histograms this is the histogram for if I have one die this is the histogram for if I have two dies there's a probability distribution out that I didn't have to do any math for I could just sample it and the nice thing about this is I can ask this thing two questions suppose that I roll four dice what is the probability of getting a certain number of eyes sort of the sum but I can also ask it a different question I can also ask, hey, given this number of eyes how likely is it that I have been rolling eight dice? I know the rules of the system I can describe them and from there on I can sample it but I can still do inference on these things so it's sort of can I look at it from this direction but I can also look at it from this direction this is a powerful thing and this is something that Bayesians tend to like a lot if you're interested in this kind of sampling by the way please consider looking at this library called PiMC3 or this other library called EMC the sampling methods for inference are very powerful it's a little bit too theoretical for this talk but if you're interested there's a very nice tutorial on my blog which explains how you can do some sort of time series analysis with these sampling tactics as well because here I'm just doing inference on dice but you can do inference on time series as well but anyway let's consider a fun example of how I actually got better at doing something because I had this computer available and I could do a bit of sampling do we know this game? do we also always play this game during Christmas where you guys are from? my dad always makes me play this game during Christmas and I absolutely despise the game so I figured how about it might be fun if I don't enjoy playing the game I could at least enjoy beating my dad at it so the idea would be can I use sampling a little bit to get better at this game because if I think about it every tile on this board is worth something and I can calculate the expected value if only I knew what the probability was that it would actually land on such a tile okay so math wise this would be a little bit hard because you have to do a lot of formulas I can say okay let's just for 10,000 times I know the rules of the system I know the rules of the game I can get that from the web let's just have everyone start here and just start rolling dice and use the rules of the game just check what the long term probability is that you will land on a certain tile there's a very interesting characteristic of this game because the likelihood of being around this corner of the board is quite high because you have this go-to-jail mechanic so I did this in a simple way I didn't include any of the cards but I did end up with a histogram like this so at the x-axis you will see the sort of the number of the tiles does it be tile number zero does it be tile number 39 and here you can see the likelihood of you landing somewhere and you'll notice this obvious spike which coincides to be jail here by the way but the most interesting thing that you'll notice is after jail there seems to be a slightly higher likelihood to be at two steps away from jail four steps away from jail six, eight, ten and twelve steps away from jail and the reason for that is because it's so likely that you get into jail if you want to get out of jail you have to roll the same dice twice which is why it's more likely that you'll land in one of these areas and if you know that beforehand you can change your tactic a little bit for example and I know there's a lot of randomness in the game but if I were to choose a station on this board it seems more relevant that I would take this station and that station if I were given the choice and now I can calculate how much likelihood it is that you actually land there Reading would be the first station this would be the second one this would be the third one this would be the fourth one and you can see that it's actually it's not twice as likely but there is a bit of bias there which you can potentially use and again this is something I did for the stations each station generates the same amount of revenue but you can scrape monopoly.com or something like that and you can actually get the amount of money out that you can get if you land in one of these places and this is a nice table which is sort of cool but then the obvious thing to do is just go ahead and plot this so for every tile that you can buy you'll see a point listed here this is the probability that you will land on set tile and this is the rent that you can charge if someone lands on the tile itself the size of the point would be the expected value so if the point is very big that means on average after every game the tile will generate more revenue from you and the thing that you immediately notice is there seems to be sort of an efficient ISO curve like everything on this imaginary line seems to be worthwhile well down here at the bottom there's a couple of you know not really performing at all spots that you can buy can anyone guess which spots those are? it's probably not these it's probably not these it would be these and the two big dots I just saw those would be these two the odds of you landing there are quite small but if you actually land there boy are you in trouble it's sort of the risk bias kind of thing it's very risky but there's a lower probability of landing here simply because it's a go to jail thing that happened before and you know I'm not drawing it with the points but you see this pattern also if you've bought a house there and if you bought a second house there et cetera et cetera et cetera so I'm not saying that I actually got much better at playing this game but I did understand the game a whole lot better and I didn't really measure how often I won but I like the fact that just by using a little bit of sampling I actually understand the game a whole lot better I know the mechanics of the system but then I can you know collect data by sampling and then suddenly I understand the game a whole lot better it turns out this is also on the blog if you're interested and this blog post is trending on Hacker News for a while and the kind people on the internet then point out to all the weaknesses of the blog post there was one guy this is sort of the flaw if you're modeling always I think this is an okay model to start with but obviously it doesn't encompass everything in the game so there was one person in particular who was very adamant and said look if you want to win you should buy these places these are the ones you want to have and the reason is there's this mechanic in the game that if you buy all the houses first no one else can buy houses so if you are the person who actually owns all the houses here no one can invest in houses on any of these loss and then suddenly these do become more valuable and again we could go a little bit further and we could go in depth and how that would work and a colleague of mine actually built a bit of software around this that you can send your own genetic bots to play this game with a certain strategy talk to me after this talk if you're interested so this was definitely a thing that I thought was fun I understood the game better turned out to be a nice blog post and it was a nice example of when sampling does something nice but there's also a little bit of a crazy example but there's also some places where in practice I want to make a living and I might actually make a little bit more money if I just do the inference by sampling and the best example of that I have are these Lego minifigures are we familiar with Lego minifigures? so the show of hands okay everyone knows me so Legos is a smart company Legos at some point realize like hey if we combine Star Wars and Legos they've got two collectors items in one and there will be more people who will be willing to buy that but with the collectors items you can make a lot of money out of it this is the original Lego minifigure series and Lego minifigures are kind of like the Kinder Bueno you open up the packet but you don't know which Lego minifigure is in there but there are 16 in a set and after two months or so they're never going to produce a set again so I figured okay that sounds interesting would there be a market for this? so you go to this second hand website and you scrape a little bit of data and you make a small little histogram and you supposedly invest in Lego minifigures at the moment it will be profitable to sell them later this is the histogram you would get out which isn't that pretty because I don't really have an impression of what the average price might be there seem to be a lot around here but there's a thick tail over there as well so how do I get a good impression of what the average might be? okay so I'll do a bit of bootstrapping I say that I have 60 of these prices I'm just going to grab 30 at random and calculate the average I'm going to repeat that over and over smooth curve so I can visually interpret the plot a little bit better and turns out if I this is for the Simpsons Lego minifigures that I was looking at these are for the other ones at the time the Simpsons Lego minifigure one was the most recent one and I can imagine that as the series gets older it'll be worth more so okay this might be a good average to look at and you shouldn't always look at averages but this seems reliable enough so these are the figures that I had I figured for 3 euros a piece and I can sell a full set for 100 euros later how likely is it to get the full set? and I was a little bit ignorant I figured I'd do this with math and when I say I'm going to do this with math I'm going to do this in a programmers way in math so you go to math overflow and you present the question and then you get this answer back which is even more complicated turns out there's this thing called sterling set numbers which is you know I'm sure it's interesting theory but I want to solve the problem so instead of looking at math overflow that comes to the rescue I should probably just you know simulate this so I did you see the number of packets that I would buy and the line itself shows the probability of getting a full set but the dotted line shows the expected number of total sets that I would have had because obviously if I buy 100 packets the odds of getting at least one full set is quite great but I might actually have two sets that are likely and again whenever you're doing these sorts of things it's always nice to visualize once in a while because if you visualize something then you can get surprised because when I was looking at this it sort of made me wonder gee if I have one set and I start collecting even more from the first set that I collected I probably have some spare LEGO minifigures which I could probably use to make sure that the second set that I buy is actually easier to collect and I simulated this over and over and over again and the blue line that you see here this is again the number of packets this would be the number of sets that I would have had this shows the average amount of time that you might need to get one full set theoretically you need about 50 it seems alright but the time it takes here is much more than the time it takes here which in turn is more than the time it takes here which in turn is more than the time it takes here so the more LEGOs I buy the higher the likelihood is I'll have more sets and again this seems intuitive but it's because I've done the inference that I was able to figure this out so again, sampling is very useful in Amsterdam I often give this course in probability theory so this seems like a nice example I ended up giving this course to a bunch of bankers and in the latter part of the afternoon we happily opened one of these boxes turns out if you open one of these boxes up you will always have three sets I'm not even randomly distributed but it's still a fun thought exercise so these are sort of the obvious use cases when you think of simulation you use simulation because you don't want to do the probability theory but there's actually other fields that can get a nice benefit from doing a good simulation exercise so let's talk about more general use cases and let's talk about optimization in general and to give the idea of how it works this is a very silly example so this is an example where we know the correct answer beforehand but suppose we have a one by one square and we want to find the largest triangle in this one by one square and again this is a very silly example we know what the largest triangle is you just make the diagonal and you're done but let's say that this is a system that we want to optimize and the computer has no notion of what the best parameters are we're interested in finding three points and the area in between these three points is the only thing that's known to the computer and the computer doesn't know any math further than that so what's the first thing that you could do? well, how about we just generate a whole bunch of random triangles and pick the best one see how good that works so that's what I'm doing here this is sort of the code that you would sort of need you just generate a whole bunch of random values in six dimensions x1, x2, x3, y1, y2, y3 those would be three points and then there's this function called a shoelace function which then calculates what the area between all these points and you do that for a whole bunch and you can draw the result and the largest triangle will be 0.5 and the probability of sampling a triangle from this region is rather low and this doesn't surprise me so what could we possibly do? well, what I could do is I could say I have an area and I have all of these x-coordinates I throw away all the bad triangles that I have because I can take the average of all the triangle sizes and I can just throw away the halfs at the bottom I can keep the ones that are on top and instead of looking at the area how about I look at the distribution of the points there is a distribution there and as luck would have it if you have a sample size that's rather big what you could do is you could give it the scikit-learn because scikit-learn has a nice density estimator so that's what you see visualized here this is the density plot for the points that are performing well and to just sort of zoom in a bit these are this is x1, x2 and x3 and it seems that if I want to get a good triangle then either it has to be a low number or a high number and if x1 is a low number then x2 has to be a low number as well or a high number this coincides with my belief of what a big triangle should be so that's sort of nice not only if I do this but if I maybe get a sampling technique that gives me better triangles but I can understand the problem a bit better as well just like with Monopoly and just like with the Lego example that I had and this is what the x and y distributions look like again on this bigger plot this is just the x's or the y's these are the x's and the y's together and what I see sort of makes sense I like it if my x is smaller than y but why be big that makes complete sense to do like that let's sample from this one so the idea is I've selected areas that are big I'm going to sample from that distribution instead this is what I had before and if I do a new sample that I've just learned I will sample from this distribution instead and again what you will notice it's a lot likelier that I'm going to sample larger triangles so how about I just repeat this sample over sample over and the nice thing is we can repeat the same idea until some sort of convergence pops out note that mathematically I've said hey we're going to select the areas that are larger than some sample than some M you could take M to be the average you could pick whatever other metric but the cool bonus is that from if you do an algorithm like this they can use inference on a simulated data to learn more about the nature of optimization problem and if you're familiar with DINIC algorithms you may notice that they actually work in a quite similar fashion except here I'm trying to look at the distribution parameters whereas the DINIC algorithm would use a similar tactic to do a proper search through the entire grid should you be interested in learning more about this there is this colleague of mine he's sitting there and he'll talk about this sort of thing more in detail later this week specifically he'll talk about how you can win the board game risk or how to conquer the world as the title would say it's Thursday 12 o'clock in a pie-term room and he'll talk more about DINIC algorithms in general and how you can apply this to many many things which is what you'll probably have noticed as well this is triangles but I can sample anything if it's continuous or discrete it's just a sampling exercise which means that I have a very flexible way of optimizing any system that's not to say that I always find the best solution but this is a proper way to do a form of search hopefully by now I have convinced you that sampling is indeed useful and it can be a little bit surprising in its use cases what I'm going to talk about now is sort of my hobby project for the next year I think and it's the thing I'm most interested in at the moment and those are generative methods and the thing that I like about them is they sort of allow you to outsource creativity and entropy has a small role to play in this so so far the distributions have been a little bit static and in this next bit I'll introduce a little bit more Markovian way to think about randomness because so far I've said here's a distribution give me a sample and it wasn't really the case that the sample that I just got determines in a little bit the next sample this is literally what is listed on my LinkedIn profile and if you would please spend a little bit of time actually reading it some of you may understand the joke it seems surprisingly relevant nowadays so a few people giggle I'm hoping for a little bit more people to giggle a couple of people are understanding the joke so if you're on LinkedIn you want to write down what sort of stuff you do so you write down our Python JavaScript and sort of the keyword bingo that everyone plays which is, you know, nice but you get all these nasty recruiters on your profile which you tend to not like so I figured it'd be fun to just add a couple of Pokemon in there as well so there's Ditto Lodash Lodash is actually a thing Philpix, Git so again the main reason is I like to confuse recruiters a bit I'm a little bit mean, probably shouldn't be but there's nothing more fun than if a recruiter says hey would you come to work for my corporate bank and you can then say I'm going to do a little part and the recruiter says yes obviously we use all the latest technologies the recruiter in question wouldn't be entirely wrong, right? I mean, recruiters are terrible classifiers for Pokemon recruiters cannot really distinguish a Pokemon name for the name of a technology so I figured making a Python library that can generate Pokemon names might actually be fun so the library is called Grable it's totally not done yet but the idea is to have tech names for a service there's a thing of Pokemon as tech names there's this GitHub repo turns out a lot of people have used Pokemon names for their original GitHub projects there's a link in the presentations if you want to look at it later it'll be fine but Metapot is actually a it's not necessarily a big data technology but it's a template based robot dynamics library and there's this lovely little webpage that for every 750 ish Pokemon tells, gives you a link to GitHub with the name of Pokemon in the package anyway, back to serious stuff the reason why I want to make Grable is I've always been a user of libraries but I've never really written them on myself and the problem seemed interesting enough I will most likely learn from doing this so I'll probably write like a Twitter bot someday that's sort of called tenas, tech names as a service or something but so the idea is to generate names that sound like Pokemon and to put it bluntly the whole point of Grable is to come up with a better name and then I started thinking about it okay so I have these, I want to generate Pokemon names it seems like an interesting problem but it involves generating a believable sequence of tokens and when you think about it, I could do this for Pokemon names but there are many other things I could do as well like read out chili pepper lyrics or Ikea furniture names or notes on a piano so the simplest model that you could possibly then think of is say, okay suppose I have some token I will, this is independent of if it's a letter in a word or if it's a word in a sentence or if it's a MIDI note in an entire arrangement or if it's a sound in a Ikea furniture but the idea is once I know the previous token I might have some other probability distribution for the next token that's sort of what Markovian thinking is all about depending on the state that I am in now I will sample from a different distribution for my next token and this is the simplest model if I see the letter A beforehand probably the chance of seeing another vowel should be somewhat smaller and seeing a constant might be somewhat larger but you can also do it not just for the last token but a token before that as well just sort of generating a Markov chain that you're going to learn and then you're going to try and walk it and sort of the basic way of doing it is to say okay I have this Markov chain I can look forward maybe I look back a bit as well so if I'm generating the third token I should look at the second token and the first one so it's a Markov chain of rank 2 but if you really wanted to this is just a way of thinking about it if I know T1 then the distribution for T2 is set sort of the sampling rule if you will but who says it has to be ordered in one direction I can also model this in a way that you can model it from two directions because if you think about it it seems fine to start with the first letter of the Pokemon name because there's a prior belief that you could start with a certain letter but there's probably a different distribution for the last letter as well so it doesn't seem entirely unsensible that Pokemon probably don't end with a letter I for example so maybe we shouldn't have a Markov chain that goes one way but a Markov chain that goes both ways in it seems rather sensible and it's sort of the same probabilistic model so I'm playing around with this so I'd just like to give you a preview here are some Pokemon names I came up with Lido, Keen, Kool, Rises, Pooley Uktkata, Yutel Olma, Alitip these seem rather plausible the red and chili pepper results are just hilarious can you believe, hold me please by the way, I wonder what the wave meant white heat is screaming in the nearest bin when I was fortunate I know you must have been fat this year eat the sun at a bottom dollar foxhole love pie in your house let me spin further light but you can't move this and the sort of the lovely joy of doing things like making these sorts of models isn't that this is accurate but it is somehow accurate like I somehow do believe that this came from red hot chili peppers and let's say not Blink 182 or something like that what you also sort of notice is that the corpus the corpus of red hot chili pepper lyrics is somewhat limited so if I say by the way we're just obviously always going to be together what the wave meant I think was also like literally in one of their songs so the corpus does have some influence but this sort of works and that's exciting same thing for Ikea furniture like I don't know about you guys but I would definitely like to have a Ripe couch or a Europe's thing the reason why this happened was I was talking to my girlfriend about this problem over dinner and she was obviously not super impressed really Vincent you're spending your time on this instead of making Pokemon names how about you make Ikea furniture names that's an excellent idea anyway the thing is I've just shown you the nice bits a lot of these are actually quite wrong these were a lot of samples that didn't really make the cut so I really think A is a terrible name for furniture or a Pokemon Day also seems a bit odd yeah so there's still work to be done and just sort of to explain how I'm thinking about maybe tackling the problem and some stuff I learned from just thinking about this in the machine learning community it's very normal to make ensembles of models instead of just making one model how about you make ten of them and combine them in some way because it seems sensible that if this model works somehow but this one works also but in a slightly different way you should be able to combine them and the laws of probability certainly allow for this so that seems like a thing I could do to make this better another thing that I could do is my library has this notion of a lexicon which is sort of like a data frame and a model would be like a model but instead of having a data frame it would be like a token what I could also do is say hey here I've got this lexicon with all the Pokemon names train it here I've got this lexicon of the English language because maybe I want to have Pokemon that actually sound English and then I could go ahead and combine the two and then these would be two models that aren't just two different models but they're also trained on different data but they can actually be glued together to maybe get better sequences what I could also do is maybe do something with transcriber or some form of transducer and the Pokemon names it seems very obvious that instead of just focusing on this letter came after that letter I might actually give some domain knowledge and say this letter happens to be a consonant and the odds of getting three consonants after each other is rather low so then I would translate sort of as a mapping the lexicon to something else and train another model of coincides this seems like a viable tactic to get extra domain knowledge in your model this way what you can also do is you can try to add judges how about I generate a hundred samples based on this one model and have this other model that would judge this model so from the hundred samples I will sort them all and maybe take the top ten this also seems like an appropriate way of thinking about it I can also think more this would be sort of hardcore but you can also think about it not in a Markovian way but maybe just generate a factor graph instead this has some nice benefits and maybe we can even take this Levenstein-ish approach where I start out with a Pokemon name and one by one, randomly, I change a letter also a way to generate something that should be sounding plausible and the nice thing about doing it this way is I'm not necessarily limited to just probability theory but I can use Jensen's word-to-vec algorithm here and then you can sort of wonder hey, what a word is in a sentence there's some context there what would a letter in this like a token in a sequence be it's also sort of an interesting way to think back we can also consider these deep models which is fashionable nowadays and the way that will work is you would say I have a start token and I have some prior beliefs to generate that and we're going to sample all the way down until I see some sort of stop token this is nice but it has some sort of I have some features that I would like to have which this way of thinking doesn't necessarily support suppose I want to generate a Pokemon name with six letters and I know the second one and the sixth one this is what makes the problem hard so I'm not sure if I want to give support to this but if you are a deep learning specialist or think you are and you know the solution to this please come talk to me, I'd love to hear what you think about it so I will focus on the following domains probabilistic graphical models seem all right heuristic approaches seem all right and deep learning seems all right it's very interesting to see how the fields are converging because nowadays you can use a neural net as a generative algorithm which takes some sort of Gaussian in and generates some sort of generated distribution out this is from the open AI page it's got some lovely research on the products like this and the rough API plan which is sort of the main lesson that I had as I was designing this instead of just writing code in a notebook it seems like a better idea that before you write any actual code you should wonder what does the UI look like I'm going to be the user I'm going to be using this a lot I have different lexicans, I have different models I love to train what's the best way for me as a user to play around with this so what you then do is just copy, scikit, learn there's some notion of a data frame and I just call it lexicon there are these different models let's say I have a factor graph, 2a, mark of chain, etc this is what defines the properties of the models and I can later fit that on a separate lexicon once those models are trained I can generate from them and the hopeful idea is that I can somehow make an ensemble based on two different models maybe even give them some weighting and then sort the outcome of this by some sort of judging characteristic of a model simply by writing this down for myself it's not even working yet this made a lot clearer for me to know what I should be building and how I should be designing things and then hopefully maybe by the end of next year I can come back and talk about a model that can make pokemon names where you say hey I don't know this token I don't know that one and I don't know that one but I want the token to end with base especially in the market for making tech names it seems very useful you can do stuff like this another thing that's interesting this is sort of the deep neural dreaming dream of building something that works for tokens but it works for art as well this is actually something that doesn't use any entropy but this is something that you can generate fairly easily in just a couple of lines in javascript and if you're interested if you're gonna come on Friday to my blender talk we'll make pretty images sort of like this but in a 3D that will be the goal of that talk we'll just use simple cubes and if you're interested come talk to me we're gonna build pretty stuff so concluding simply can be a whole lot of fun and sometimes actually profitable lego example getting started is super easy you might actually be surprised at how often it can help you out again people don't necessarily always understand pymc3 because it's a little bit less straight forward on the theory side but you're very very flexible you can just describe the system and sample away and you can actually solve a whole lot of problems python is a great use case language for this it's actually surprisingly easy to be very flexible with just a couple of lines of code and it's actually quite fast as well numpy is great and if you're ever considering thinking about api this is something I kind of learned from the art community try to optimize for joy you're gonna be using the library maybe and it might be better to spend an entire day thinking about what the api would be like such that we'd be the most fun to start using the library instead of having a mountain you should climb in order to become a pro in the language maybe we should have this pit that you just fall into and you're immediately a pro thanks for listening I'd be happy to take any questions but anything pokemon related that's not about the game you can also just talk to me in private when I'm outside somewhere any questions? there's one person in the back there white shirt I believe I'm not wearing my glasses also if you've done something similar to this also come talk to me this is sort of a hobby project but I'd be happy to hear if someone else has done something similar my question is can you speak up a little bit? my question is I'm not sure if it's a proper question but if you had to simulate a network of cues so you have a cue and a cue how would you do that? so there's two cues next to each other let's say there's a network so in the use case for MIDI this is definitely a problem right because if you're doing a MIDI track Pokemon names and this is a toy example those are easy the main gist of what I'm trying to get to at some point is this would be interesting for music you have the bass that's playing you have the drums that's playing and then you have the melody for example then you have three sequences that actually have to correlate somehow but in this case don't really fit into this model what you could do then is there's a couple of libraries that have a bit of support for this but you kind of have to go into probabilistic graphical modeling in that way the trick is to then say there's two tricks you could do there's one trick where you can say these are three tokens one separate token and that will go into this one list and I will try to generate that this can be, you might need a lot of data before you actually get the pattern right so it's a little bit expensive in a way the other way is to not have the complexity in the data but that's complexity to the model where you just say hey these are three time series and they're somehow correlated learn that and you could do that with a sampling approach PIMC3 has some examples of that but then you get into sort of correlated time series land if I have like a whiteboard I can more easily explain that to you so come to me afterwards if that's something you're interested in but it is sort of doable anyone else? one person here yes mm-hmm ah okay that's a good question correct me if I'm wrong but I believe the question is hey this is a nice talk but obviously when you have more dimensions this would be harder right so for the triangle example that's reasonably easy because there's only six dimensions so the dimensionality is always an issue right and I believe I'll just grab the picture so suppose we had this but in 12,000 dimensions obviously it's a whole lot harder what I would be more saying here is consider this as a approach it actually has a couple of useful use cases and you can actually solve some things with it but especially in the optimization field where you have lots of hails and many many dimensions the reason why we use genetic algorithms that's because of the best thing we have not necessarily because that's the best thing we could have when you go into random algorithms land you do that because there's no alternative there's greedy methods but those are downsides too yep so I didn't quite get what was why couldn't you do like an LSTM ah so the thing with the LSTM is usually you can say hey generate lots and lots of sequences the issue I sort of have is with this one use case so suppose that you say I want to have a Pokemon it starts with an H then an A and then after three tokens comes a P alright so you want like I wanted to finish sequences but can't you like just plug in a bunch of Pokemon names and see what comes out one more time can't you just plug in a bunch of Pokemon names and then see what comes out and I have but then the thing is I stream all the Pokemon names in Pokemon name, Pokemon name, learning internal states there usually how you would generate a new sequence would be to say here's a start token and then at some point it's going to sample an end token and then it's done then it has a Pokemon name and what I could do is I could say generate a whole lot of them until at some point you have a Pokemon name that starts with an H then an A then three tokens whatever and then a P but that feels like over sampling a bit for sure so this is more of an open problem it's very fun to go to academic conferences and ask this to professors but yeah there should be a sort of more neural way to also approach this problem and that's why the generative thing from open AI where you actually add the entropy yourself seems like a worthwhile venture it's just that I've never really heard anyone say here's an obvious solution to this problem like if it's not the most important problem in the world either right so I'm not too angry about that thank you let's give a big round of applause for Vincent Wadmerdam