 complexity about modeling complex system to go and react. So technically speaking, I don't really need to give this talk or do anything of this with Go, no react. But it's something that I think is pretty interesting. Then Go is something that you can actually do this with. Most of the time when we actually use technology, and I assume everyone here is an engineer, right? I only know, I don't know three guys, the rest are actually. And most of the time when we use these technologies, we write business systems, and we actually help the business to deliver systems that generate money. But I wanted to give talks like this to showcase that we can use technology for other purposes as well, for many other different things. And one of those things that I want to talk about today is using technology to do some investigation, some experimentation on complexity, complexity being sometimes called complexity science, being a science that talks about the behavior that emerges from a group of interacting parts. And this is not directly resulting in the interactions between individual parts. It's a bit worthy of one of the examples, analogies that I want to give as with this. I know this looks strange to you. What do you see in this picture? A dead dog. A dead dog, OK. A lot of people in the picture, dead dog. If you look at the whole picture yourself, it's a portrait. But if you look at individual components, then you will see that two people are dead. Yeah, so it's an optical illusion. And again, most people would not use an optical illusion to depict complexity science. Complexity science is not an optical illusion. But what I wanted to show here is that if you look at it from a certain way, it looks like a portrait of an old man. But if you look at it from a different angle, it's actually consists of two people, one old man and a lady carrying a baby. And then a dog lying down on the ground, probably not dead. Slipping. Probably sleeping. So there are characters. If you look at them individually, they are different. But if you look at it from a whole, it's actually a different kind of character. Hey, more people. Welcome. So complexity science is somewhat like that. It is not exactly the absolute technology. But it's just that if you look at it from an individual point of view, you will see something. But if you look at it from a bigger picture, it actually becomes something else. So that is the idea behind complexity science. So I'm going to talk about three cases of how complexity science can show us something interesting. And the first thing is about something like what would you do under these circumstances? In 1964, a 19-year-old girl called Kitty Chanovisi was murdered by a vagrant. She just recently graduated from high school. She was working as a bar manager in a bar. And she was going home after work one day. She parked the car, came out of the car, was approached by a man. She tried to run away. The man chased her and stabbed her a couple of times. And when she was stabbed, she screamed out, that help, help, I'm being murdered. Apparently, the place where she was stabbed was actually in front of an apartment complex. And the windows were open in most of the apartments. And obviously, there was a time where most people were at home. So it is most likely that a number of people saw her as well. It was reported that 37 actually saw the murder, but none of them caught the police. She bled to death in front of her apartment. So that's like 51 years ago, kind of co-blooded. Is that what's happening in society and everything? But more recently in 2011, in China, a two-year-old girl called Wang Ye was hit by a van in a city in China, then ran over by a large truck. And there were a large number of bystanders who also watched that happen and into anything. She was left lying there for about seven minutes before finally somebody came in and helped her. But unfortunately, she also died a few days later. So you look at these tragedies, you see that, hey, what's happening in this society? How can people be so co-blooded? Is that what civilization is coming to? Is it like the end of the world? Why are these things happening? If you were one of them, would you have helped? So some of the questions you could come to mind. This is actually a known phenomenon in sociology, social sciences, and so on. It's called the bystander effect, where it happens to have a lot of people seeing the same thing at the same time. You would expect maybe somebody else to maybe call the police or help, because if the more people happens to be around, it is less likely that the person will be helped. So this is actually a well-known phenomenon. And what attempt to explain it is using game theory. Anyone here knows what game theory is? It's a different case with INB. If I don't do something in INB, we have some strategy to fit the system. It's something like that. So obviously, it's not really about games. It is about playing games. Do you use sport popularity in this respect? Yes, you do. So it's actually a mathematical study that studies models between people, conflicts, and cooperation. And it's often used in economics and political science. It's mathematics, essentially. There's actually quite a lot of mathematics. So it sort of overwhelms you of what will come in a while. Specifically, the model that we're looking at bystander effect is a model called the volunteer dilemma. And it's not just found within humans. Actually, it's found in nature as well. This animal is called a meerkat. Most popularly, probably, you first seen of this in Disney's Lion King. The character is actually a meerkat. So the meerkat has one very interesting behavior that sort of illustrates what the volunteer dilemma is. So during time when the meerkat forages for food, one or more meerkats will actually act as a kind of sentry. And they will stand up like this to make themselves look taller and then just look around to see whether there's any predators around. If there's a predator, what will happen is that the sentry will let out a cry or a warning to warn the other meerkats to run away for safety. But you can realize that the dilemma here, the volunteer dilemma, once the meerkat actually cries out a warning, obviously the predator would target the meerkat. So if there are a few sentries and they saw the predator, would you run away first? Will you sound out a warning? Because sound out a warning, you see the predator, of course, the safest thing for you to do is run away. But of course, then the other meerkats will get hunted, might get hunted down. Or if you sound out a warning, then you yourself might get hurt. So this volunteer dilemma, your altruism is actually not rewarded because your altruism might be sort of very fatal for yourself as well. So that's in nature. But let's go back to the model just now on the murder of Kitei Jonevisi. And let's look at the mathematical model in modeling or modeling what happened. If you look at V as being the value gain if one person volunteers, C as the cost for volunteering, and A as overall cost if no one volunteers. And then we draw a matrix, what is called a payoff matrix in game theory. So you have a matrix for two people. Let's say there are two other people and both you and I saw the murder. What happens? If I volunteer and you volunteer, obviously, if I volunteer here, this is the value gain for volunteering. And of course, if you volunteer, this is the cost of volunteering. So it's V minus C. And here is V minus C as well. If I volunteer, it's V minus C, but you don't volunteer, you get the full value. You get the benefit, but you don't actually suffer the cost and so on and so forth. So this is a payoff matrix for two players. So here, if I volunteer, it's V minus C. And if I don't volunteer, this is V. If I don't volunteer, but you volunteer, so I get the full value of V. If I don't volunteer and you don't volunteer, so we get V minus A instead. A being the cost of the bad thing happening overall. So from this, we want to achieve a equilibrium called the Nash equilibrium in game theory, where these two sides equate each other. So you have V minus C equates with the P, where the P is probability of volunteering, times V, the value of cost, plus 1 minus P, V minus A. So this is the equation for a mixed strategy for Nash equilibrium. OK, so far? That's for two players. Now, if we extend it a bit for n players, the probability of volunteering gets P to the power of n minus 1. And the probability of not volunteering is 1 minus P to the power of n minus 1. The whole total equation, assuming there are n people in that particular game or in the particular scenario, this is the equation. It looks complex, but actually it's not really very complicated. It's just a simple algebra. You break it down. And what you get is the probability equals to 1 minus cost over A to the power of 1 over n minus 1. We have a formula now for this particular game. So what we're going to do next is to do some Monte Carlo simulations. And of course, obligatory code. And this is really the code I'm going to show you later. And I will actually run it for you and you can see how it runs. Sorry. Why does it not work? OK, I forgot. OK, so volunteers dilemma. Number of agents are number of players. See, we see this overall cost. We move this around. And here there are no agents as well. The more people it goes. Now let's look at this. The first one is the volunteer cost. The cost of volunteering. Now the cost of volunteering is low. What do you see? The probability of actually somebody volunteering is pretty high, right? It's close to 100%. As the cost increases, you can see the probability drops until it hits zero. And this is obvious. If it's actually so costly for an individual to volunteer, the more costly it is to just likely somebody will volunteer. Now if it's overall cost as well. What is overall cost? It means it's so costly overall that the bad thing that happens if nobody volunteers. If the bad thing is so bad, then you can see obviously the bad thing is so bad, the worse it becomes, then the more likely somebody will volunteer. That makes sense too, right? And of course, if the overall bad thing is bad, it is basically meaningless whether I volunteer or don't volunteer. If the bad thing happens, it doesn't matter. Obviously nobody will volunteer. So that makes sense too. So what I'm trying to get is, yeah, the model makes sense. And of course, you look at the here, the agents, or the players, the more players it goes, you look at it, any difference? There's no difference. What it tells you is that really doesn't really matter how many people are there, right? So let me come back to the presentation. If I could find my cursor. OK, let's look at some of the things. This is where you saw this now. Conclusions. Now this is conclusions from what I derived from the chart. How do we improve the volunteering? How do we make sure that more people actually volunteer? So obviously, it decreases the cost of volunteering, right? Make it easier for people to volunteer. And why do we want to do that? Because we want to actually make it less likely for such tragedies to happen. Increase the world's cost of not volunteering, which means that the cost of nobody volunteering is so bad, so terrible, that people will want to volunteer. Of course, you don't want that, right? It's like, if nobody volunteers, there's going to be a nuclear war kind of thing. Of course, somebody will rush through to volunteer. Increase the difference between individual cost and overall cost. So obviously, that's it. The difference is between individual cost and overall cost. Let me just quickly go back to this thing here. If you look here, the difference here is about 75%. But let's say you put here. But if you increase here, you notice that's the difference as well, right? So the actual thing is that what you really want to do is to, what you really want to do, oops, it goes back again, is to really increase the difference between the individual cost and the overall cost. It's not to really decrease the cost, individual cost, so low, because sometimes it's not easy to. Or increase the overall cost because, of course, you don't want to judge it. But it's really to increase the difference between the individual cost and the overall cost. Reduce the number of players. Again, you look at the distinct again, right? Agents, if I really look at this and I reduce it down to a very low number, you notice the probability here, 65, with three people. And probably it actually drops afterwards. What does it tell you? It tells you that actually with fewer people, it is actually more likely that somebody will volunteer. But after a while, if you go up to here, the number actually doesn't change much, like 40, 40 something. But the initial part of it, you look, with just four people, it's 55%, 51%. But after a while, it just drops to 40% and it's still the same to the end. So from the charts, you can say that if you want to, if you want to encourage volunteering, you should consider reducing the number of players. And that could come in different ways. For example, we use number of players. It doesn't mean sometimes you cannot control the number of people on the scene, but maybe you can control how people, me as an individual, can see how many people are around. So that's really what it is. Not really just absolutely how many people are there. And finally, the other conclusion we can see is that the increasing number of players have a negative or no impact. OK, so far? All right. So the next thing that I want to talk about, anyone know what this pattern is? Except Vincent will probably know for sure. Tintin? Tintin, this is Tintin in Congo, I believe. This is obviously very in an age where it's OK to depict Africans this way, but probably not. And there were people who were talking about Tintin being very racist. But obviously, if you're growing up, you probably never think of it that way either. And this is something to do with what I want to talk about today. A cartographer called Bill Rankin, he actually, what he did was he created a map of Chicago where each dot here represents 25 people. And then what he did was he did a taxonomy of race. And what you can see from this particular diagram, pink represents the white and blue represents the black people. You can see very obviously that this whole city is very segregated by race. And you look Hispanic and blacks and the whites don't actually mix. So Chicago people are very racist. But if you look at other cities in America, Detroit is a huge straight line here. You see this straight line here. You look, this seems a bit more faded. It's more faded because it's, let's say, Detroit is actually less people than New York. And this is why this is darker. One dot represents workers, 25 people. In New York, it's pretty much segregated the same way. Washington DC less, but it's very obvious that there's a left and right. East is more black, and west is more white. LA is actually less, it's a bit more diffuse. But still, you can see that there are the sea of Hispanics here, and then some blacks here, and then white people along the beachfront property. So conclusion, Americans are racist. But not really as well, like so you look at London. This is from another chart, a census of ethnicity, a lot of blues. And the rates are actually segregated from the greens and segregated from the blues as well. And London is one of the more racially diverse cities. But still, you notice people are actually segregated from each other. What does it tell us? If we actually go to other cities around the world, which I don't have the data, I believe that's also very much true. People are segregated, and we look at people in our region. You will also notice that there are more people who are. If you do not actually enforce certain rules, then people would tend to clumb with their own race, with their own kind of people. Just like we are gathered here because we are all go-lang people. So people are actually segregated here as well. Is there a real study about this? Yes, and is there a reason why this is this way? There is this guy called Thomas Schelling. Anyone know who Thomas Schelling is? He's a Nobel Prize winner in economics. He's an economist. One of the most popular papers he wrote was this dynamic models of segregation, which talks about how people are segregated racially. His model is different from the one that I'm showing you today. Basically, what I did was I read his paper and reinterpreted it in a slightly different way. The model I use is one of 36x36 green, with each with an agent. And if you look at it, each cell has an agent, and each agent has eight neighbors, except for the corners and the sides, which they would have less. Let's take a look at the rules of how we model this. At every tick, at every interval, check every cell. If at least n number of its neighbors are the same race, do nothing. And here, say, if I put the n to be 2, if I have two neighbors which are the same race, I don't do anything. If not, I will randomly pick an empty cell and I'll move there. Basically, what I'm modeling is this. If I say in this house, and I notice that my neighbors, there are just two of them who are my race. If the n is 2, and I'm happy with that, it's fine. If now, it is only one of my neighbor is the same race, I feel unhappy at all moves. So that's basically the rules. And I'm basically abstracting it down to that model and displaying on a grid. So we're looking at the parameters. We have n, which is the acceptable number of neighbors, r, which is the number of races on the grid itself, v, the percentage of vacant cells. And policy limitation, should I limit the number of neighbors to be on the same race? Because as you know, if we live in HDB flats, sometimes, well, you cannot have more than certain people of particular race and so on, right? What I'm trying to do here is to see, does it help to have policy limitations? And what does it mean by being racist? If I put a certain number of people within this particular block, rather, put certain people there, would they still tend to clump and how racist am I? Obviously, the larger the n is, the more racist you are. Because the smaller n means that I'm okay for diversity. The larger n means I'm not okay for diversity. And again, more obligatory code, and I can show you this, you know? Let me show you the second model, certification. So, set up, random, this is totally random. Let's say n is two, and there are two races on this grid. The percentage of vacant cells, 20% of the, of course, it has to be a certain percentage, because if all of them are occupied, then nobody can move, right? And of course, the neighbors quota, I put to eight because the maximum number of eight neighbors are eight, so I put eight means there's actually no quota. Let's see how it goes. See, from the original, if my acceptable number of neighbors is just two, they would actually be segregated, which means here that even if my tolerance level is really high for racially diverse set of neighbors, it will still end up being segregated. Let's set up to one, see what happens. You notice what happens? Well, very little movement, which means that most people are pretty happy, right? So you will notice that the acceptable number of neighbors, maximum number is actually eight, so only when one, then there is no segregation, which means really you need to be really, really racially tolerant in order not to be segregated. And if you look, you remember the charts I showed earlier on, that's part of the reason why you see that, you see that the chart seems to be very segregated is because it doesn't mean that, it doesn't mean that you are actually racist to be segregated in the city, right? Without policy limitation. Let's put this, let's say my, I'm highly racist, we said that, okay. I think so, whoa, whoa, whoa, whoa. Everybody starts moving around, right? Huge jump, and they keep moving because why it will never stabilize? Because nobody's ever happy. Everybody keeps moving. So obviously this is good. So let's go back to two where they actually become segregated. So what about number of racists? Is it, maybe because there are two racists, therefore they're like this, let's increase the number to four racists, but if they're highly racist and there's no two racists, shouldn't they eventually settle left or right? So that's the rule is actually. Especially if you run like one million in the nation, it's sooner or later they might find it. No, so let's do that again, you're right. So here the movement sort of mostly stopped. So it's still segregated, doesn't really matter in the number of racists. Okay, so let's go back to here. Let's say two racists, just two racists. Initially a lot of movement, and after a while you notice that the movement actually dies down to nothing. So this is really what it is. It will not seriously get like top down, it doesn't. But just like it's switching positions a lot of time. It was switching positions because people were trying to find a spot where it is acceptable for them. But after a while they just stabilised to this and they're not moving again. See nothing actually moves, nobody is actually moving. Everybody found a spot in the world and they are happy there. I mean they are actually segregated now. I'm not sure what this sound is. Let's say increase the number of amount of vacancy. Again, there's lots of space for people to move. But you notice after a while again that it actually clumps, right? It actually gets segregated again. So the amount of vacancy doesn't help either. Right, increasing doesn't worry at all. Now let's look at this quota. Just now there was no quota unlimited, right? Let's limit it. You cannot have five which are more the same as you. Because everybody is unhappy but you still cannot say with the same people it keeps moving. So does the policy actually help? Well, it does help. But the policy cannot be too extreme. You notice here it's a little bit more diverse. I'm sure I cannot remember what was the best number. And there's a certain point in time where there would be stability but it would not be segregated since it's not acceptable. But you notice the movement is actually less than previously. Probably the best number is 57. All these are all integers. If you look at the bigger grade and a different set of parameters you'll probably settle at a certain number. So the conclusion is let's get back to the slides. Screech conclusions. So segregation do happen even there's a big preference for all the papers of the same type. The weaker the preference the less segregated. So if there's more preference I didn't really show just now somewhere in between. It's not so it's two and I show five and it's two and it's five. But if it's somewhere in the middle actually what happens is the segregation becomes clearer. I can actually show you. You see it takes a while but it does stabilize, right? It stabilizes and you see this is actually less segregated than with the quota is eight. That's okay. Now let's show three. Just now this is about this three. You notice the segregation is more distinct, right? The clumps are actually bigger than n equals to two. So you look at this after all it's stabilized. Let's say n equals to two. The clumps are smaller. The segregation is smaller. And this is what I meant here. The weaker the preference the less segregated. The stronger the preference the more segregated. At a particular threshold the stronger preference results in an unstable but non-segregated state because everyone keeps trying to move around. Number raises have no impact. The both of you can tell us have no impact. And policy has a limited impact. But if you try to impose a very strong policy what happens is just unstable state. So the last piece that I want to talk about is clash of cultures. I got this actually from a game. There's apparently a game called clash of cultures. I got this one there. You played it before? No, I played it past a class game. Oh, okay. Yeah, funny picture I got somewhere. People turn up at a football game and talk about different things. And really what I talk about clash of cultures here, right? Mickey Mouse in Japan. This is Avengers in Hindi. Starbucks in Beijing. This is, I think, in the forbidden city. Of course, we talk about American culture invading other parts of the world. But also talk about other parts of the world invading the US, right? So yeah, Chinese food in the US, which is actually not Chinese food. I eaten some of this before it tastes horrible. And of course, yoga in US in popular culture is not exactly the yoga that's practiced in India anymore. So what is one of my trying to say here is that cultures do clash and do diffuse with each other. And yeah, pizzas as well, the original pizzas and pizzas that you ate. This, I don't know what kind of pizza this is. It just looks horrible. It's an American pizza. There is a paper written by this guy called Robert Axelrod. He's a political scientist and also a complexity theory researcher. He won prizes before. So he talks about how culture disseminate with each other within cultures and how cultures interact with each other. Do they clash? Do they absorb each other? And how does one culture transform into another culture? Again, the same thing as the previous experiment I ran. I took his ideas and I sort of re-implemented it in a slightly different way. Of course, Robert Axelrod never actually implemented this in this way at all. So if I look at culture as being a set of features and a trait being a possible value set of features. So what I'm trying to do here is I'm trying to create some agent-based modeling where each agent represents a different culture. So if you see on the grid that again I will show you, each cell has one agent and that agent represents a particular culture, whichever culture you're talking about. And every culture has six features. So zero, one, two, three, four, five. And each feature has 16 possible traits. So if you look at this, what do you see? How do you think I can represent this? Two, like two digit code then. It's actually a cheetah, right? It's a color code, it's a hex colors. Basically I have six features, one, two, three, four, five, six. Each feature is a hex number. It's basically zero to F, 16 numbers, zero to F. And of course as the numbers change, then the color actually changes ever so slightly. As before, eight neighbors per cell. And the group, what happens is that agents who are similar to each other will interact and become even more similar to each other. This is how cultures work as well, right? You have two cultures who are geographically near to each other. They will influence each other and then after a while become more and more similar. So the rules for the simulation, again, every tick I'll randomly pick a N number of cells and I compare the features of one culture with its neighboring cultures. If the trait difference is less than T, the trait difference here is T, but I randomly select either culture and copy one trait of the feature into the other culture. Basically it means that both cultures become more similar to each other over time. And this is how it works. So you have A and B who are neighboring cultures. And I compare every one of these traits. So five and two, difference is three. You add them up together. So the difference between the two cultures is 34. If the cultures are 100% different from each other, it's like black and white, then you have 100% is 96. If the difference is zero, they exactly each other means both of them are the same color. That will be zero. It's more similar, the cultures are the more likely to be a cultural exchange. So let's say you look at the real life, for example, if the culture in one place and the culture in the place, they speak the same language, it's more likely that then certain traits will actually be absorbed into each other. So what we get is the probability of the culture exchange is one minus the difference between the two cultures by 96. Simple formula, that's the probability. And when there is culture exchanges, what happens? Five here, we copy it over to five here and then the color changes here. So let's look at the final simulation and I'll need to copy this thing here as well. Why do I need that? You will see in a while, okay? So set up randomly, just set it up to different cultures on the 36 by 36 grid. You see the blue here is the distance between two cultures. The red here is the changes. And the orange here is the number of unique cultures. So what do you see here? Obviously the change, it keeps changing, right? Because culture keeps clashing with each other, mismatching and exchanging ideas and so on. Number of units drop, which means as the cultures mix, they are actually less and less unique cultures. Originally the whole grid is full of all unique cultures, every one of the cultures is different. But as time grows, the number of unique cultures actually drops. The distance between the culture actually drops as well. So initially every culture is very different from each other, the distance. It drops, but you will notice that the number of units actually drop more over time, while the distance actually do not drop over time. This actually takes some time to run, so I won't actually go to this, I'll just go back to the slides and show you some of the conclusions. So this is actually what happens. At one point in time, distance will probably, over a long time, will probably drop down to zero. Changes will drop down to zero, the units will drop to very low number as well. What does that mean? It means actually it's the dominance of one culture over other cultures, right? From a grid of 36 by 36, a lot of cultures, you will drop down to very few cultures. So do they, among the last ones, are there actually any that is part of the first set? So I'll talk a bit about that. So average distance tells us how far apart the cultures are. Units, how number of cultures changes, how vibrant the cultural exchanges are. So after a while, there will be no cultural exchanges because they all say so in conclusion. So eventually the equilibrium will be only a few dominant cultures. It will just be a few. It will not be like so many different cultures. Dominant cultures can be very different from each other, which means that even though they are, even though a few of them, it doesn't mean that they're all the same each other. Some of them can be very, very different from each other. And that's probably, again, one of the reasons why they are very dominant because they're very different from each other. If I increase the number of grids, I don't have time to show you the number of grids because it involves some code changes. Smaller areas results in faster equilibrium, or smaller than the number of dominant cultures. If I have very small grids, sometimes you can go up to just one dominant culture. A culture that's more dominant at one point in time doesn't mean it will be dominant in the end. So what happens if you look over time? The number of cultures, the number of dominant cultures. So let's say at this point in time, you see this, let me just show you. You see here a dominant culture here is somewhat like a yellowish here or this light blue. And it could be very dominant over time, but after a while the light blue could actually go away entirely. So dominance, initial dominance, doesn't mean eventual dominance, because the cultures actually change over time. That probably answers the questions, right? So that was my last slide. I know it's kind of abrupt, but, you know. And you can see this slowly when it's actually quite pretty. You wanna see the code, I can show you the code here. So it's a web app. No third-party libraries, send and go libraries. This is segregation, it's actually quite small. This is the one, just again, it's really small. And this is the culture. It's big, that's why I didn't actually kind of paste the code in the slides. The final is basically, say, react. Sorry? Not yet, is it? I think it is. You saw it. So to be utterly a good friend, right? Yeah, actually I can't remember what to put it up with. Okay. You will be, you will be. Any questions so far? Thank you very much. Sir, is there any, who's the dominant culture here? Is it random, or can you start off with some topic in your opinion? No, it's random. So initial, initial cultures are all random. Eventually, even the cultures, yeah. So the initial set of cultures would not be the same set of cultures towards the end either. So it's not seated, and the way the experiment is run, I also did not keep track of whether the culture actually, the initial cultures actually become dominant in the end. But probably it doesn't because all the cultures actually morph into something else. Which again, is another one of the poise here, right? Because whatever culture you start off with, do not expect it to be the one at the end. Like, you see the American culture today, is probably not the same American culture in the, say the 1900s, or the 1920s, 1950s, or the 1980s. It would be helpful if you can draw some code logic in time to your demo, because it was mostly demo and there wasn't any code logic of how you put that in the code. I actually originally had that, but I was afraid that it would be a bit too long. Because the focus was more on the demo and on the story, but rather the code logic. So we did a little bit, as you demo, you can show a little more interesting. Good point. I think that's cultural, for sure, but I think the race stuff can be a cultural show. In some areas, I mean, for example, in France it's not really good to see racial statistics and stuff like that. That's why probably it's a bit shocking, but I'm sure in India, they don't really guarantee probably it's normal. In Singapore, it's very normal. In the US, it's very normal. But it could be triggering some issues. Okay, good point. If I actually get to speak in France, I'll... I'll be there. On JavaScript, we use... Sorry? On JavaScript, we use, well, JavaScript also in the HTML section. Ah, okay. So this is one of them, this is a volunteer's jazz. This is React. This is the React bit. This is basically nothing much more than the container for the code. It's just the container for the code. For the grid, I actually use a good strap. So each grid is basically... I'm basically using a CSS grid. And that's why you see that I have a 12 by 12, 24 by 24, 26 by 24. Probably should have done this a little bit better, but I just hacked it out. Oh, like React components? These are our React components. The React components. See, I'm using... Basically, this is... Probably don't need to put all this, but this is basically bootstrap and covering the background color. React and the code? Obviously, it hasn't got the code. Just like this, it's... There's a click start. It calls culture slash start. And culture slash start is basically... This guy. Culture start. Basically, this produces JSON. And it emits to that guy, that guy takes the JSON and then you would just repaint this. In the JavaScript, I have a... Set interval to every half a second. Refresh the screen. That's how I got the grid. So the go part, does the JavaScript... At each point, there are different states, right? So as it runs, it will finally... So does the JavaScript tell the state to the go part and the go part process and use it back? Or the go part just... JavaScript asks for a second, make state, make state, and the go part stores the previous state and processes. So all the state is at the server. It will just emit and every half a second, it will just grab the current state. Okay. The JavaScript, the React part is all reader only. It actually doesn't send any data back to the go. It just emits. So the experiment is actually entirely in code. That's why I show you go code only, right? The display is in React. I could actually do this some other way as well, right? I could use like a mobile app and sort of get the data from here. This is all JSON data. The JSON data is actually quite simple. It's just a whole lot of numbers. Was there anything unique about using Go to do what you just did instead of using another language line? One thing is probably speed, to be honest. Yeah. I think I would have problems running. So I've not really tried this in Ruby. I only did this in Go, but I did do agent modeling in Ruby in the past. I did my previous presentation about this. And it generally slows out a lot as the numbers become large, whereas this guy is still chugging away pretty fast. Did you make use of Go routines? No, I didn't. I could have done Go routines in more complicated agent modeling because then each agent itself could be a separate Go routine. But that's not something I did for this guy. This one, there are more just different types of simulations. I could have done the whole thing in JavaScript as well. How are you using Go as well? There's a terminal you can pin off on the terminal. On the terminal? It just leaves this blade on the matricle or something. It probably would be possible, but I have no idea how to do it. I would have to repaint it. This was easier for me to do this. It just emits JSON, and then I have a front-end that will just keep on reading it at certain intervals. In fact, I don't need to set it to half a second. I can set it every second, and it's still the same because I'm just reading the state at that point in time, whatever state it is. It means that the data would be... There's two tickers, basically, and the Go ticks on each side. You will go tick on itself. And JavaScript will tick on itself. You will just refresh at certain intervals. Of course, it will look more jagged because the data points that you take are actually far apart from each other. So if you take it every five seconds, of course, suddenly you see this is very random. Then after that, the next tick, it's like, oh, it's done. Because in between, basically, it's actually done through a lot of iterations. Whereas your refresh rate for the JavaScript won't be a lot slower. On both the server and the UI, you're using half a second. No. On the server on Go, there is no... It just loops itself. It just continually loops. What makes it a more continuous state? It's just the state and the final millisecond. Yes, correct. So of course, if I go down to every, say, 100 milliseconds, then I will see things to change a lot more rapidly. And this more contiguous kind of change. If I set it to one second, then it seems more jagged. The change seems more abrupt. But it's still the same, because whatever Go runs, it's at the back end. Did you get the chance to add benchmark? So within the final 20 seconds, how many times you go? I did benchmark. Because what I used to do in Ruby in the past was, I would run this, and I would generate data files, and then I would run another program to generate the graph out of it. So it's not real time. Because Ruby, it can be a little bit slower. But Go, I'm actually doing this real time. And React also allows me to do some refresh. But it's not really React. In JavaScript, it allows me to do a lot of refresh quite rapidly. And the charting is done with Google Charts. Charting is done with Google Charts. So it's actually quite fast. Everything actually runs pretty quickly. Any other questions? Any other feedback? Thank you for the feedback. But any other feedback on the presentation? I'm trying to use more variables in the models that we took. To understand, it's very simple. We can get it from like a bundle. To think about more, for example, even in this, apart from distance and the difference in the races, et cetera, there are many, lot more factors, which we can include one by one. Yeah, that's true. That's true. Probably the next time that we have a project, we could try more factors inside and see how complex it could be. My idea was that if there are more factors like that, maybe the equilibrium that we see would be quite different. It might not happen. And it would always be some turbulence or something. Yeah, you're right. And I think one of the reasons why it's done this way as well. I think it's also done liberally. I basically took an existing paper and I interpreted it in a particular way. And the parameters are actually from the paper anyway. But the reason why it's done that way is really to limit the number of parameters so we can analyze certain parameters. If I change this parameter, what happens? If I change that parameter alone, what happens? It's a science experiment. You maintain all the other variables the same. You just change one variable. How does it change? So that's the purpose of that. The more variables that I have, it's true. You can actually try different variables. But it doesn't go away from the initial principle, which is to keep everything the same, just move one. Keep everything the same, just move one. All right, thank you.