1 00:00:05,820 --> 00:00:08,580 Hey everyone and welcome to this video. 2 00:00:08,610 --> 00:00:14,240 In this video we are going to have a look on the problem and try to build the algorithm for that. 3 00:00:15,060 --> 00:00:24,890 So here if you notice I have the game from last match and up. 4 00:00:26,040 --> 00:00:29,120 Now in this module they're going to work in most practical way. 5 00:00:29,120 --> 00:00:33,780 The Tao actually and how properly the problems are solved. 6 00:00:33,810 --> 00:00:41,440 The past three projects are just to explain you how actually by 10 bucks for building the applications. 7 00:00:41,450 --> 00:00:46,030 Now first we will have a look at the problem. 8 00:00:46,050 --> 00:00:53,830 So if you notice the first thing I notice here is he's asking for the input of playing again or not. 9 00:00:53,970 --> 00:00:55,740 That is input for loop. 10 00:00:55,740 --> 00:01:01,350 We can see and you can also define the same thing in your own words. 11 00:01:01,470 --> 00:01:08,000 Then we have this interface but that interface is not actually a major task. 12 00:01:08,370 --> 00:01:14,400 But you notice there we have this figure that is we can see that both structure 13 00:01:18,970 --> 00:01:26,680 that is also not our typical task the difficult task here is if you notice that we have input in this 14 00:01:26,680 --> 00:01:30,130 board structure that is nine inputs from this to this. 15 00:01:30,160 --> 00:01:33,220 So these places are actually not vacant. 16 00:01:33,310 --> 00:01:35,260 They are some variables. 17 00:01:35,710 --> 00:01:47,610 So we have to define the strategy in a way that it will be an input for nine values so that's the second 18 00:01:47,610 --> 00:01:48,840 thing you notice there. 19 00:01:49,230 --> 00:01:54,470 After that third thing then you try to play the game. 20 00:01:54,480 --> 00:02:01,980 You actually notice that when I add a move there by entering the number it convert that move to that 21 00:02:01,980 --> 00:02:04,830 particular position with the cross marks. 22 00:02:05,580 --> 00:02:12,670 So we can name this one like user we didn't see that user move. 23 00:02:12,670 --> 00:02:21,190 Instead of input then we had as you have noticed the computer move against to us. 24 00:02:21,340 --> 00:02:23,780 That's the thing there. 25 00:02:24,390 --> 00:02:30,170 Rest you will notice when I die there with the computer. 26 00:02:30,190 --> 00:02:31,380 It shows me time again. 27 00:02:31,540 --> 00:02:38,350 How did you get to know that it actually ties and how it get to know that all the positions are filled. 28 00:02:38,440 --> 00:02:45,400 So the issues here is like we can see that free space is any free space 29 00:02:48,560 --> 00:02:57,370 then we have something like inside that Veena it actually decided that to actual events like when I've 30 00:02:57,370 --> 00:03:05,050 been here on this one match then I've been he shows me X on the game X is actually this one. 31 00:03:05,440 --> 00:03:07,210 So it actually can we do that. 32 00:03:08,470 --> 00:03:11,470 Who is the winner at that particular position. 33 00:03:11,470 --> 00:03:17,770 Like on that current move and his his top then he did not work after that particular move. 34 00:03:18,280 --> 00:03:30,080 So there's something like beside oh we can see that those look after the winner. 35 00:03:33,170 --> 00:03:38,450 As this unfolds on Like after dinner he shows that X won't this time. 36 00:03:38,480 --> 00:03:40,790 Good job like this one. 37 00:03:40,790 --> 00:03:44,560 So these are the main things I notice in the scheme. 38 00:03:44,570 --> 00:03:47,680 Maybe you notice more things than I have noticed them. 39 00:03:48,140 --> 00:03:52,850 And then that will also be good and you will get some perfect output. 40 00:03:52,850 --> 00:03:57,060 Then mine so these are the things. 41 00:03:57,080 --> 00:03:58,930 Now how to develop them. 42 00:03:58,950 --> 00:04:02,090 We are going to again write an algorithm here. 43 00:04:02,400 --> 00:04:07,370 That's actually not algorithm just steps algorithms as answers steps. 44 00:04:07,390 --> 00:04:12,660 You can see that there a little systematic idea like algorithms. 45 00:04:13,590 --> 00:04:21,150 So the algorithm for this one will be something like first I need to design the wall. 46 00:04:21,570 --> 00:04:30,270 I believe this is the first dance because before the input we require both there and also you can make 47 00:04:30,270 --> 00:04:34,270 this one like first I have the input then I will design. 48 00:04:34,280 --> 00:04:41,580 There is also something that is similar to this thing like first to design the board or go for input 49 00:04:41,670 --> 00:04:43,370 and vice versa. 50 00:04:43,410 --> 00:04:46,040 So design the. 51 00:04:46,830 --> 00:04:53,730 I have noticed the input first so I'm going to develop the input first day after designing the board. 52 00:04:54,090 --> 00:05:00,500 We have something like men the right the users move and the computer respond to that move. 53 00:05:00,510 --> 00:05:07,530 Then before players move like the computer may move there's a thing that either these spaces are empty 54 00:05:07,530 --> 00:05:12,000 there like it has decided that all these spaces are full. 55 00:05:12,030 --> 00:05:13,600 So we tried again. 56 00:05:13,710 --> 00:05:22,590 So we have something to check like is this board is full or not so is free space defined something like 57 00:05:22,590 --> 00:05:27,340 that one you understand this thing also that is and is free space there. 58 00:05:28,290 --> 00:05:32,730 Then after free space then this get completely full. 59 00:05:32,730 --> 00:05:34,910 How did you decide it decided it. 60 00:05:34,950 --> 00:05:35,940 Who's the winner. 61 00:05:37,050 --> 00:05:40,730 So we have also something like is venal. 62 00:05:40,830 --> 00:05:41,550 Who is the winner. 63 00:05:41,550 --> 00:05:45,160 Like the computer is we know we are the winner. 64 00:05:45,210 --> 00:05:47,250 Something like that. 65 00:05:47,250 --> 00:05:56,190 After that these things done we have the input board input for nine values and the we know we have also 66 00:05:56,190 --> 00:05:56,670 decided. 67 00:05:56,670 --> 00:06:03,750 But here we have noticed this problem in the last bar that actually needs to be defined first. 68 00:06:03,820 --> 00:06:09,790 So after that we have these things like player move 69 00:06:13,140 --> 00:06:21,900 then we have computer move these teams we have to work on after that this computer move will consist 70 00:06:21,900 --> 00:06:24,570 of the A.I. type thing. 71 00:06:25,050 --> 00:06:32,820 Then we require the main logic as usual in every program and this will not be answered by my logic. 72 00:06:32,820 --> 00:06:34,600 The computer will not do everything by itself. 73 00:06:34,600 --> 00:06:41,580 We have to define that one also because the computer will do only the things that we give him instructions 74 00:06:41,580 --> 00:06:46,650 of after that something like these things. 75 00:06:46,650 --> 00:06:47,450 That is. 76 00:06:47,880 --> 00:06:54,120 Please select a position to place from one to 9 something like that we can see that interface and then 77 00:06:54,190 --> 00:06:55,740 also an immediate interface. 78 00:06:57,480 --> 00:07:03,750 Maybe these are the only things that we need to do in this problem and we are going to work on this 79 00:07:04,050 --> 00:07:04,910 one by one. 80 00:07:05,040 --> 00:07:08,370 And if you have different algorithms then go for your own algorithm. 81 00:07:08,610 --> 00:07:15,000 Maybe that will also Vogue and maybe that will begin even tougher than this one because they some bugs 82 00:07:15,030 --> 00:07:19,100 in still still in this program that I'm going to give you as a homework. 83 00:07:19,860 --> 00:07:21,430 So thanks for watching. 84 00:07:21,450 --> 00:07:22,820 We will continue in the next video.