So warm welcome to everyone who's joined us here for the 15th episode of capital insider series as we take a look at the New age startup capital which also exists in the ecosystem and has been doing so for quite a while Which is called the venture debt and now in very simple terms if I was to tell you what is venture debt It is really debt financing which is done for venture backed or equity Venture backed venture equity backed companies and of course if you do them it rightly or if you get your Venture debt rightly it can actually be a lot better for startups Rather than the risk capital, which is the startup or the VC capital that they usually go for so today We joined by Ashish Sharma. He is the managing director and CEO of you know when capital India private limited and You know as one of the largest venture debt funds in India and also spread across Singapore Southeast Asia and China They have some rocking portfolio companies Inside their system, which is companies like Moby Quake, Pepper Fry, Oyu Rooms, Trevo, Shoptlou, Zunkar, Aether Allergy and many Others across other markets too. So thank you for joining us today Ashish. It's wonderful to have you over here And you know today together In the stock we are really going to look at the ecosystem of the venture debt market and how venture debt is probably going to gain Prime importance and should we look that as a great capital resource for the startups who are looking to grow their business So, you know, let me start with a very basic question But I think it's always useful is how does the economics of venture debt really works? I mean from a startup's perspective if he was to weigh venture capital and venture debt How should he make the economics work in his own head before he applies for it? Yeah, so I mean we get that question a lot So the two ways to look at it. One is basic theory, right? So if you think about theory, there is cost to every level of capital So the cost of equity is obviously higher and the cost of debt is lower So one of the things every company not only startups, but even if reliance takes a debt The only reason they take debt is because what they want to do is on their capital structure They wanted to they want to reduce their weighted average cost of capital So that's the theory, but you know practically I'll give an example So let's say there is a company series a company which is raised five million dollars at evaluation of twenty five million dollars, right? Which means that they diluted twenty percent now in their series B I mean they have an option to raise let's say ten million dollars and let's put a number Let's say the valuation will be fifty million dollars, right? Which would be in another twenty percent dilution to the dilution that has already happened Now they could choose to say well instead of raising ten million dollars of new capital equity capital Why don't we raise eight million dollars of equity capital and two million dollars of venture debt? Right. So in this case instead of diluting for the twenty percent They've only diluted eight or fifteen which is six, you know sixteen percent and technically they've saved four percent of equity dilution And the venture debt I mean it also comes with some equity kickers, but those are very little on the cap table So in this example if this company were to turn out to be let's say a very big outcome Let's say if it were to be a unicorn and if the early state investors and entrepreneurs Could save four percent at an early stage. I mean that could be worth a lot of money and ownership So that's a very simple example, but there are a lot of use cases of venture debt which we can get into as we kind of talk through this You know this decision Sure Let me ask you a more pointed area of venture debt is that you know particularly for your own portfolio companies at what stage Would they go out and look for venture debt? You know was it after they had raised some serious amount of capital than the series A series B Or was it still in early stages? Did they think of it as a bridge funding arrangement to grow their business? So particularly what stage of is this start up usually in when they go out and look for venture debt? As you I think you had alluded to in the beginning. I mean we look for institutionally backed startup, right So by definition our strike zone begins when the company has raised some level of institutional capital Be just the CVs around and we can come in even with the After that we can just come in with the CVs around So so very much I mean again the size of the check might be different because obviously it's dependent on the size of the company How much capacity it has from a dead standpoint? But I think you know founders should start thinking about venture debt as they are doing their first institutional check and That's the right time and you know we do a lot of follow-on investment So there are a lot of our portfolio companies that we might have been five six seven transactions. So, you know So this is not like a one-in-one really Capital as they become bigger as their balance sheets can absorb more debt I mean we can continue to kind of support and help them in various use cases as well as Optimized dilution. So so I think you should start thinking about it as you are let's say signing a term sheet even for your CVs Okay, so I mean so companies which are prior to CVs they usually should not think of I mean Let's say they are raised as significant angel funding. So that may be too early for venture debt. I Think as a rule, I mean we look for institutionally backed companies now, you know for every rule There could be an exception if it's a rock star founder which raised which put in their own money and raise the very large You know, I mean we could probably break that rule but as a rule generally we look for institutionally backed startups Sure, and I mean just for our understanding how is venture debt different from Bank financing and you know Why is it that Bank financing is very difficult for startups to get I mean, but at the same time, you know Venture debt is something that they can go for It's very different because I mean Frankly the only reason you know players like us exist is because this asset class Doesn't fit in within the risk box of a bank, right? I mean more blue banks look for I mean banks look for what they call cash flow underwriting Which means they underwrite companies to see whether these companies would be able to generate enough free cash flows to service their debt So which by definition means that the company should be profitable So that's one criteria and you know as we know while there are some profitable companies, but by and large You know startups are still investing There is a cash fund involved So so that's one criteria. The other thing is banks obviously like security and whether it's you know, plant and machinery or You know, it could be real estate and and most of the startups I mean largely what they have is In the form of enterprise value and IP. So these are acetylite companies. They don't have a track record which are not profitable You know DNA and understanding to underwrite these companies so so essentially a lot of times I mean we you know start a relationship with a company and you know frankly as they become larger We even you know introduce them to banks and as they become larger banks in providing certain You know short-term financing working capital kind of things But you know eventually if the company becomes large and becomes profitable There would be a time where they will get into the spike zone of banks and our goal is frankly to come in when Banks either would not or could not underwrite these companies Sure And what what if for our understanding is usually the difference of interest in a bank loan versus a venture debt loan? I would say again It's not the right question because I mean it depends on which company right? So obviously a bank loan to a Tata or alliance is very different from a bank loan to You know 20 can or SME right? So I don't think so you can because it's the nature of the risk is very different Clearly when companies become large enough right where banks can underwrite that's not the time You know where we can do too much And and you know clearly I mean as I said I mean the only reason we exist is because Startups generally don't fit in within the response of banks Correct and I mean, you know if if somebody has taken a venture debt when or At what point of time is they are they expected to return it or do you at least I mean You know if for some reason now for example We're sitting in the midst of a pandemic and we've seen moratoriums happening. So is our venture debt companies also working on the same model? Yeah, I mean so clearly in most companies have to You know start making monthly payments now for some companies there may be a period moratorium PZ where they don't they need to only service interest and Depending on the situation, etc. I mean we work with founders we work with the investors in the company To structure things that make sense So but but generally the difference between equity and debt Largely is I mean equity is high risk high return. I mean that is I mean our debt is kind of medium risk medium return expectations and The companies have to You know think about and have the discipline of planning where they can also return the debt over a two to three year period Depending on the structure of the loan And I mean, you know, I have read that venture debt is really a runway extension For a startup, I mean, that's how they need to regard venture debt when they are looking to raise capital So what what exactly does that imply? So runway extension is clearly one of the big use cases, but I would say there are a lot of use cases though So in the case of a runway Essentially, if you look at startups typically the funding cycles are anything between, you know, less than 15 to 18 months Now obviously there is a startup that is really really hot. Maybe they are doing, you know rounds very fast So today what's happening in a tech for example, but generally 15 to 18 months, right? And that's the time the company needs to get to the next level in terms of milestones so that they can the next class of investors and While plans are great, but you know things change it is taking much longer in terms of adoption than what the company thought Putting in a little bit of debt, I mean gives them more questions where instead of having to rush into doing a fundraise You know, they can delay the fundraise and do it at the right time from a position of strength But one thing I would definitely highlight is like most companies most good companies don't do a fundraise when they are Money in the bank and and a lot of companies actually look at it that way as well saying well I can raise money But I would rather raise money with 20 million dollars in the bank versus having 10 million dollars in the bank Because that helps them to you know, have a better negotiating Leverage with prospective investors I mean you don't do a good fundraise when you you have to look back in your bank account every month and see You know how much money you have left so that's clearly one of the big use cases You know sometimes companies that are growing exponentially I delaying the fundraise and you know those founders know they can always raise money In fact, they're existing investors are happy to you know give them more money and higher valuation But these founders are very very sensitive about how much dilution and what valuation, you know, they want to do fundraise that So so we have seen examples where companies by taking some venture debt Delayed their fundraise to get the right level of valuation which in I mean there are few examples Which was 50 to 60 percent higher than if they would have done a fundraise if they didn't have that additional Liquority that mentioned it provided so that's one use case I mean there are multiple other use cases that means such as there are companies which have a lot of KPEX and Working capital requirements. Now these companies frankly because cost of capital is high cost of equity is high They don't want to kind of put all their equity money, you know stuck up in working capital KPEX, right? So so you know venture that can come in there. There are a lot of Take some money and buy out buy out some of the early investors buy back rather There are companies who have used venture debt to acquire Other companies where frankly they had money in the bank But if they spend that money to acquire they would have had to do a fundraise much faster than what they wanted So a lot of use cases, but eventually it's lesser diluted less diluted And generally works well both in the upside scenario as well as the downside scenario Yeah, so I mean For from your perspective as a CEO of a venture debt What has changed in terms of how you give out venture debt to a startup now versus what you were doing in pre-pandemic? So, you know particularly for you how the internally the rules have changed How do you know I will look at the startup what parameters do you weigh them on and you say that okay? You know, so maybe it could be More sustainability better unit economics, so I mean, how do you sort of look at those parameters differently now in these last six months? So I would say if you ask me the same question maybe in March My response would have been different. I think things are a lot stable now And frankly if I look at our portfolio, which is very large You know, I think it's a net positive so more companies More sectors are benefiting from COVID have been made then the ones that have had went Where because of the pandemic and the customer behavior I mean, I mean the recovery the demand destruction has been very high and the recovery is going to take a long time So in these companies, I mean, yes, if you are a category leader, I think you can still raise venture debt and possibly equity But you know, if you happen to be in a competitive space and there is you know Very limited line of sight to recovery and it will be a slow recovery. I think it becomes a lot more tougher To raise both equity capital as well as debt capital. No exceptions will be there for very strong companies So that's one I think The second thing is something has now we always have you know runway in the back of our mind But I mean has the entrepreneur has the founder, you know, navigated the crisis well Have they taken the right actions to keep the company safe and secure, right? Have they You know really, you know change their business model made to be in line with some pervasive customer behavior changes Or are they essentially doing a lot of blocking and tackling and really not able to use this as an opportunity So, you know beyond that, I mean the basics are not very different. I mean just to give you some context I mean, you know for us Jan to March was very strong. I mean, we close probably 10 to 12 transactions and then Even before it came to India because we have a portfolio in China. I mean, we had been looking at what's happening with COVID since February So frankly, you know, April, May, June Parts of July I think the focus was largely on the portfolio side trying to work with founders and you know other investors and Get a better sense on how the recovery is what kind of actions are being taken. But now frankly over the last two months I think things are stable and as I said, I think the portfolio, you know, is next positive Then they're not just driven by the fact that a lot of these companies stand to gain With some changes that are happening in the behavior of customers Sure. I mean just for our understanding. Do you also I mean look at SMEs as a prospective client or a prospective you know, investee for your capital In any case, maybe not just in India, but maybe even in China or Singapore and other places Again, SMEs, I mean technically you could argue why is there definition? A lot of the startups are like SMEs But yeah, I mean we stay away from, you know, non-institutionally backed companies and They may have a bank financing and there are a lot of companies which you know, which are profitable and you know Which are SMEs and doing good business and being around for 20 years. I mean that's where banks happy to and they can provide collateral in terms of property and other things and that's really not our segment I mean our focus is more new age. Our focus is more You know, I would say largely tech-enabled but there are a lot of new age brand have come in as well in the portfolio and Our focus is to work with the companies that have raised some level of institutional capital because in addition to various things We would look at from a startup standpoint. I mean, we also work very closely with the fellow investor community Right. So to some extent, I mean Apart from our own assessment on the founder and the company and the factor I mean, we also lead to fellow investors who we work with very closely trying to get their cases trying to understand You know why they invested in the company You know also talk to investors who might have looked at the company but decided not to invest as to why did they not invest in this particular company You know talking to Investors and trying to get a sense of I mean, which are the kind of investors that would be attracted to this company for the next round of fund raise So frankly because we don't spend as much time as an early stage investor would And we have to rely also You know on some of the inputs that we get from the existing investors in these companies I mean, we stay away from SMEs. That's more of a bank play sure and I mean, so what kind of companies or how does your portfolio vary in India versus other countries? I mean, you know how has ventured it and its Inceptibility and the way it is growing and how founders have been using venture data as a tool for or a capital tool for growth Different than you've seen in India or in other markets And what can probably Indian founders learn from international founders in terms of using venture dates? So maybe you know, you can give us some guidelines over there So I would say I mean again using mention it and in the use cases are not very different, right now You know this asset class is the derivative of the overall VC asset class overall, you know So so the more companies get funded the more money comes in from early-stage investors and both stage investors The more capacity these companies have today ventured it, right? so so in a way it's proportional to the size of the overall industry and Obviously, I mean if you look at the valley in China, I mean the both those ecosystems are a totally different level We are far far smaller in every aspect Whether you look at the amount of funding whether you look at the exits and IPOs So, you know, I mean clearly the US is the largest market from a venture that standpoint now India You could argue is now kind of after the valley in China the third largest ecosystem now There are a few other names as well, but you know, you're getting there So I think I mean the penetration of venture data in India is still much lower Then what you would find in the valley I think compared to China. I think the penetration is more or less the same So I mean for us clearly, you know, China China is a big market though We only started there a couple of years back. So we are still early there India is the oldest platform. I mean this used to be Silicon Valley Bank India Which got acquired by Thomas in 2015 and kind of so India is the oldest platform and I mean Southeast Asia again has been around for, you know, three and a half four years So so I mean all all three markets are important. China clearly is a big market But India probably we have the best presents given the vintage that we have had and and I think you talked about You know any suggestions other markets to founders So I would not talk about venture it but generally I would say I mean if I look at China and I get a chance to, you know, kind of sit on the Asia enlistment committee and see what's happening there So that you see do I think clearly the the that market You know two or three aspects is far ahead. I think in terms of, you know I think innovation particularly as it comes to, you know, some of the new You know kind of deep tech, you know AI Machine learning all the buzzwords that we keep hearing about I think You know autonomous driving I think that they are far far ahead in some cases much ahead of the valley as well I think in terms of scale, I mean how quickly Companies are able to kind of go from X to you know, 10,000 X while in India also I mean there are some great examples, but the scale there is very different and finally I think, you know, a Lot of companies are profitable have part to profitability lot of companies have been able to You know go public both in the domestic market as well as the NASDAQ and other New York Stock Exchange Now Hong Kong and some of the China domestic market that they're focusing on So I think one thing if I have to look at is the rather two One is I think while in India, I think there's been great progress on a lot of business models I feel like when you look at cutting edge deep tech product focus companies I mean there are not great examples. I mean we are not talking on zoom I mean the question that comes is why could zoom not have been invented out of India, right? You know, you know, I mean if I'm So product companies, I think you know product companies still in India. I mean we have to see a lot more of Israel is another example where they have actually a lot You know great research and you know, they're very good in security and certain domains that they are very good at The second is really is I think I think time has come where You know, some of these come some of our largest companies Should go public and I feel like they're definitely five to ten companies that have the potential in the next couple of years and While valuations are great. I Feel like you kind of grow up once you become public when you are in the Public domain and that's where you actually Get the best price discovery and you control your own destiny and that's not dependent on just funding So those would be the two aspects. I would like to see more and based on, you know, the progress so far I mean, I'm pretty confident that over the next few years, I think on both these aspects We will see a lot more progress out of it. Yeah, sure. So we've got some questions on Facebook Sort of is asking now that RBI has brought startups under priority list and startups can get up to rupees to 50 crore loans How will that change the dynamics for the VC or the venture debt ecosystem? That in fact I was on one or two panels and this announcement is unfortunately like many announcements, you know, the as you kind of look at the Problem statement the problem statement was not that the banks did not have liquidity or the banks could not afford to give money to start up The problem statement was that banks are either Unwilling or as part of their risk policies, you know, cannot provide Long-term financing to startups and you know, frankly nothing changes with that Because today if any bank wanted to give money to start up I mean, you didn't need this priority sector lending because you know startups anyway You can I mean, you don't need any pricing advantage banks cost of fund is very low So the the only so I don't think so. This actually solves any issue meaningfully Maybe it might help a few large companies with respect to pricing, but by and large, I don't believe You know, this solves anything Sure. So Dave is asking that any particular sectors who are going to enjoy the venture debt interest more than other sectors So the point is more in terms of interest rate or where we have more interest And you know, obviously you mentioned about the headwind and tailwind So I think that's where the question shoots from that, you know, what sectors are you sort of more Gung-ho about in some sectors where you would not want to look at giving away their venture debt So before answering that I would say I mean clearly as a business, I mean, we are sector agnostic and state agnostic I mean, we have backed probably eight or nine unicorns in India and big names In some of these cases we came in when they were not unicorns I mean names like a Swiggy or a Baiju or you know, your rooms and you know, some of the bigger names like that So we are safe agnostic sector agnostic. However, if you look at what's happening today Clearly, you know, our bias is towards Industries and companies with a small, you know, more visibility around demand Where we can we believe that actually the Pandemic is actually a net positive for those companies because of certain changes that are happening in those Segments, so it will be the usual suspects. I mean, you look at, you know, ed tech I think e-commerce There are companies which gain from e-commerce like we have a lot of logistics companies and some of them Primarily third-party logistics company which primarily focus on the e-commerce segment You know, then, you know hyper local is again You know, we have a few companies in the portfolio hyper local grocery delivery or other kind of hyper local companies I think health tech is in a decent space I would say Agri Tech while there was some supply chain disruption in April in parts of May But has come back very strongly So clearly, I mean whether you are equity investor or venture debt Frankly, it's the same companies the same founders So you would essentially want to focus on companies that are tailwinds Having said that, I mean, we are also looking at some large companies Where possibly either they didn't feel the use of venture debt But maybe now and these are big companies, you know, the category leaders where While the business might have suffered some some some challenges, but you know, I mean, there's some companies, right? So they they are open to bolstering their You know liquidity because they can raise money. Thank you They show is they don't raise money at the wrong time and the wrong valuation They would rather recover and then grow somewhere. They were pre-covid So I think those will be the sectors where the focus is a bit higher I think I would say even parts of enterprise to enterprise that companies depending on which sectors and what kind of services you offer There is some tailwinds there as well So so so tailwinds sectors. I think large category leaders or number two even number one number two in large categories And clearly there are certain sectors, which we would rather look at it from a bit of caution So whether it's travel or hospitality or parts of mobility or companies that are largely offline You know things of that nature sure So, you know, finally to sum it up, you know, what what sort of readiness do you want a Startup to have before they actually apply for a venture deck I mean, you know, maybe two or three pointers that you can share whether it's about their books or whether it is about their Founders own, you know business. So anything, you know, you say that okay, this shows that you have greater readiness for venture day Well, because I mean we come in with or after company as there's an institutional round I think purely I mean, they don't need to prepare something because, you know, frankly, they could be round There is a lot more in-depth due diligence that happens So I think in terms of, you know, information and what traction they have and products and demos I mean, they've already done a lot of work and especially growth phase late stage They have, you know, a lot of information, right? So I think it's less about, you know, the readiness is more to do with I think once you sign your first term sheet You should start thinking about venture debt and frankly it's just another you know The color of the money is the same whether it's debt or equity. It's just the money in the bank, right? The use cases are different. I think you should start thinking about as you are trying to close your let's say first institutional check I mean, you get to know that some of the venture debt players and in fact, we also proactively engage with companies even before You know, they might have closed the series around. Maybe they have closed the large angel or they've closed three series around So I think it's more to get educated look at the use cases Maybe as you're thinking planning about your fund raise, you can already say, okay, you know If in addition to this I can layer in this much more venture debt So those would be the things and frankly, there are certain cases in certain businesses They're maybe mentioned that may not be the most optimal. So, you know, if you're very early phase company, maybe you've raised some equity But it's a binary outcome. It's a very high risk kind of a business, right? Only IP driven either it was or it doesn't work. I mean, there might be certain founders Who may not be comfortable raising debt because in their mind, you know That comes with an obligation at least the moral obligation and the contractual obligation to pay back While there is even when you take equity, you have a moral obligation to generate returns for your equity investors But there is no contractual obligation to pay money back, right? So I think it's just kind of thinking through the use cases and planning as you're doing your fund raise Whether it's your first fund raise or the second fund raise I think keeping venture debt as a integral part of your financing rounds. That's what we are seeing a lot of smart founders do Sure Okay, great. Thank you so much for talking to us Ashish and making us more aware about really the workings of Venture debt. I'm sure if you if our audience has more questions on venture debt and it's working and how to how to how can the best You know apply for venture debt, please leave your questions on our Facebook live talk you can see our handles right here and We love for Ashish or some of his team members who can answer these questions for you and probably give you some more ideas on raising Venture debt until we are able to meet each other and getting in person I think this is the best way where we can actually resolve most of our queries and get more educated and get wiser As we sit in our homes looking for business opportunities outside. Thank you very much for joining us Ashish. This is one for talking to you Yes likewise Thank you


I'm here at NerdCon Nerdfighteria about to get punished and these people are all voting on the thing that I am going to blend. Hello people! Is this a situation that mustard is gonna improve? Is it pudding? Yeah. It's all... Do you have somebody filming for you? No, I need someone to film for me. Who's filming? First, we have... POTOL! They are strawberry flavored. Regular. That's probably fine. Is what flavor they are. Hot dog! I think we are all rooting for a vegan blender, but it's not gonna happen this time. Sriracha! Smells spicy. Have you ever had sriracha? Because you're gonna want it to have some heat. Number four is... Baked bean! Hello! I'll be back. He's got a little bit of beef in there. Oh... Everyone stop being excited just now. PUNNY! Hank, I'm giving away the rest of your sriracha. This nice person in a sailor hat. Peanut butter is happening now. I don't know how to get the peanut butter in there. I got it, I got it. That's spoken like people who've ever done peanut butter face, frankly. Come on, get down there. There needs to be something at it. It's going to be almond milk. Just to be clear, you have to eat all of what is in there. That's not happening. Hopefully this will work. So I go down in a blaze of glory. I'm deeply regretting some decisions I've made in my past. It looks like meat slurry. It looks really, really bad. Is that the blender that I just heard? Yeah, that was the blender.  Yes, you're in the right place.  Oh, God! Oh, this is... Oh no! That was very bad. I wish there was a way that we had smellivision in here.  You guys, this was not in my contract. Can I get one more sniff before you take a huge gulp? I mean, that is very, very bad. Joke, joke, joke, joke, joke! Messes up. My vlog brother must be punished. It's very spicy. It took a while for that to hit, because the peanut butter was masking it. Maureen, it's over. Okay, Maureen, I put it away. Rodney has taken it away, except for this cup part, which you... I'm not even being funny, legitimately queasy. So I guess this is... Can I just... Just joke. Do we need to do, Hank? John, I survived. And it was, I think, worth it. I loved last weekend so much. Thank you to everybody who came out, and thank you also to you. John, I'll see you on Tuesday.


Hello everyone, this is Alice Gao. In this video, I will introduce several population-based local search algorithms, including the genetic algorithm. So far, the local search algorithms only remember a single state at each time step. The advantage is that these algorithms require very little memory. The disadvantage is that they can only keep track of one state at a time. Perhaps, if an algorithm could remember multiple states, it would have a better chance at finding the best state among them. Let's explore an idea called population-based local search algorithms, where an algorithm remembers multiple states at each time step. Our first population-based algorithm is called beam search. Beam search remembers a population of k states, where k is greater than or equal to 1. How do we update the population of k states? At each step, we will look at all the neighbors of these k states, and we will choose the best k states among all the neighbors to be the population at the next time step. The value of k affects beam search in several ways. It affects the amount of memory we need. The larger the k, the more memory we need to store the population. The value of k also controls the level of parallelism. A larger k makes the search more parallel. We will be considering the neighbors of a larger number of states at each time step. Let's take a look at a few questions. They can help you think more about the properties of beam search. What does beam search look like when k is equal to 1? How is beam search different from running greedy descent with k random restarts in parallel? Can you think of any problems with beam search? Pause the video and think about these questions for a few minutes. Then, keep watching for the answers. Let's look at the answers. Question 1. When k equals 1, beam search is essentially greedy descent. It remembers one state and moves to the best neighbor at each time step. Question 2. How is beam search different from greedy descent with k random restarts in parallel? If we run k random restarts, these random restarts are independent from each other. Each search updates its state independent of the other states. However, with beam search, we're choosing the k best states among all the neighbors of the k current states. Intuitively, the k states are not operating independently, and there's some sort of communication among them. For example, if one of the k states, called x, has some really good neighbors, then it's possible that the next population consists of only state axis neighbors. It is as if state axis waving its hand to the other states and saying that, look, I'm in a really good region, come over here and join me. Therefore, k random restarts in parallel are independent searches, whereas the k states in beam search are not independent. Question 3. Can you think of any problems with beam search? The example I gave for question 2 may give you some ideas. If one of the k states is in the region, is in the best region that we've found so far, beam search will quickly concentrate its effort in this region only. Doing this is great for optimization, but not so great for exploration. Whenever we find a good region in the search space, we tend to cluster there and ignore other parts. This causes our population to lose diversity very quickly. This problem leads to our next algorithm called stochastic beam search, which tries to improve upon beam search to maintain diversity in the population. Stochastic beam search is quite similar to beam search. It remembers a population of k states. The main difference is how it updates the k states. While both algorithms will look at all the neighbors of the k states, beam search chooses the next k states deterministically. In contrast, stochastic beam search chooses the next k states probabilistically. The probability of choosing each state is inversely proportional to the cost of the state. The lower the cost of the state, the higher the probability of choosing the state. A crucial difference is that beam search will choose the best states only, whereas stochastic beam search may choose every state with a positive probability. For stochastic beam search and the genetic algorithm, we want to convert the goodness of a state to a probability. So it is more convenient to talk about fitness rather than cost. Fitness is often the negative of cost. Minimizing cost is equivalent to maximizing fitness. If we convert each state's cost to each state's fitness, then the probability of choosing a neighbor is proportional to the state's fitness. Stochastic beam search is better than beam search at maintaining diversity in the population. Since there is a positive probability of choosing every neighbor, the search is less likely to cluster in the best region found so far. This gives us a chance to explore different parts of the search space. In a sense, stochastic beam search mimics the process of natural selection. Imagine that each state is an organism. The state's neighbors are potential offspring. The survival of the potential offspring depends on their fitness. Some will survive and others will not. The offspring that survive will make up the next population or the next generation of organisms. Intuitively, stochastic beam search resembles a sexual reproduction because each state produces its offspring without mixing with other states. Next, let's look at the genetic algorithm. The genetic algorithm draws its ideas from biology and evolution. It is similar to stochastic beam search. It maintains a population of case states and chooses the next case states using a probability distribution. However, the genetic algorithm uses a different probabilistic selection process than stochastic beam search.  To produce each state in the next population, we start by choosing two parent states from the current population. The probability of choosing a state to be a parent is proportional to the fitness of the state. The higher the fitness of a state, the higher probability of choosing the state for reproduction. Note that a state can be chosen multiple times for reproduction. Once two parent states are chosen, they're mixed in a crossover process to produce a child state. There are many ways of performing crossover. Typically, the child will keep one portion from each parent. After crossover, the child state may mutate with a probability, mimicking a random mutation in evolution. For example, we can choose a portion of the child state and randomly change it to some other value. This final child state is one member of the new population. We will repeat these steps until we have produced k new states. These k states make up the population for the next time step. This process repeats until some stopping criteria are satisfied. One stopping criterion could be at least one state in a population has a fitness that's greater than some desired threshold value. Another stopping criterion could be a maximum number of iterations or generations. Check out the example of executing the genetic algorithm on the eight queens problem in a separate PDF file. If you have some time, check out this genetic algorithm car simulator. It uses a simple genetic algorithm to evolve random two wheeled shapes into cars over generations. It is quite entertaining to watch. I have discussed a few different local search algorithms so far. At the surface, some of them appear quite different. For example, you might think that greedy descent appears to be quite different from the genetic algorithm. But are they really that different? Let's do a quick comparison between them. The purpose of this comparison is to help you realize that these two algorithms have some highly similar components and are not that different. Recall that many local search algorithms try to trade off exploration and exploitation or exploration and optimization. Let's consider greedy descent and the genetic algorithm and think about how each performs the tradeoff. The first question, how does each algorithm explore the search space? The second question, how does each algorithm optimize the quality of the population? Pause the video and come up with your answers. Then keep watching. For exploration, a local search algorithm relies on the neighbor relation to explore the search space. However, the neighbor relation for greedy descent and the genetic algorithm look quite different. For greedy descent, the definition of the neighbor was relatively straightforward. For the genetic algorithm, the neighbor relation is a randomized process consisting of crossover and mutation. Starting with two states in the current population, the genetic algorithm produces a new state by crossover and modifies the state with a small probability using a random mutation. The goal of the randomized process is to generate a child state that's quite different from the two parents and allows the algorithm to explore a new region in the search space. Next, let's talk about optimization. Every local search algorithm tries to optimize the quality of the current state or the current population. Genetic greedy descent does this by moving to the best neighbor. What about the genetic algorithm? The genetic algorithm optimizes the population by choosing the states for reproduction based on their fitness. The higher the fitness of a state, the more likely the state is chosen for reproduction. The idea is that if the two parent states have relatively high fitness, then the child state will likely have a higher fitness as well. This scheme reminds me of a Chinese animation that I watched recently. It's called Linglong Spirit Cage Incarnation. In the dystopian world, humans were nearly wiped out. The remaining humans had to form a society with several new rules. Relationships are banned. More importantly, only people with superior genes are allowed to have babies. This idea is very similar to the genetic algorithm. Unfortunately, there are obvious ethical issues with using the scheme for the human society. That's everything on population based local search algorithms. Let me summarize. After watching this video, you should be able to do the following. Describe beam search, stochastic beam search, and the genetic algorithm. Describe the properties of each algorithm. Compare and contrast these algorithms. Explain how each algorithm trades off exploration and exploitation. Explain how the algorithms borrow ideas from evolution and biology. Thank you very much for watching. I will see you in the next video. Bye for now.