1
00:00:00,240 --> 00:00:04,800
It's now time for the final project where we put everything into practice.

2
00:00:05,160 --> 00:00:08,430
Now, before I reveal the next message, just a word of warning.

3
00:00:08,850 --> 00:00:12,930
It has explicit content. If you are hungry,

4
00:00:12,930 --> 00:00:16,590
if you haven't eaten, if you are intermittent fasting like me,

5
00:00:17,130 --> 00:00:19,950
it might be worth skipping over the next image.

6
00:00:24,470 --> 00:00:26,630
Let us describe what we're going to do

7
00:00:26,630 --> 00:00:30,020
in this project, we're going to be baking some cookies.

8
00:00:30,620 --> 00:00:33,170
We're going to be playing the cookie clicker game,

9
00:00:33,560 --> 00:00:36,560
but we're not going to do it normally like a normal person.

10
00:00:36,560 --> 00:00:40,130
We're not going to go and click on our cookies and tirelessly end up with

11
00:00:40,130 --> 00:00:44,960
repetitive strain injury and play the game as if we're a human. No,

12
00:00:44,990 --> 00:00:49,010
we're going to play it using a Python bot created with selenium.

13
00:00:49,610 --> 00:00:54,610
So recently I've been looking on Reddit and there's a lot of posts talking about

14
00:00:54,920 --> 00:00:59,180
how addictive this cookie clicker game is. Why is this game

15
00:00:59,180 --> 00:01:03,860
so addicting, cookie clicker ruined my life. And when you think about it,

16
00:01:03,860 --> 00:01:05,960
it's such a simple game.

17
00:01:06,680 --> 00:01:11,540
All it is is a big giant cookie, you click on it as fast as you can.

18
00:01:11,990 --> 00:01:15,020
And once you've gotten a number of cookies,

19
00:01:15,230 --> 00:01:18,950
then you can buy certain upgrades like a cursor,

20
00:01:19,010 --> 00:01:22,940
which will click on the cookie automatically for you.

21
00:01:23,390 --> 00:01:27,560
And if you get even more cookies, you can end up buying other things.

22
00:01:27,800 --> 00:01:29,990
For example, once you have a hundred cookies,

23
00:01:32,660 --> 00:01:36,860
you can by a grandma which will bake more cookies for you.

24
00:01:37,760 --> 00:01:42,760
But we're not going to do it manually because I can physically not click at this

25
00:01:43,370 --> 00:01:47,210
rate. We're going to get our bot to decide which add-ons to

26
00:01:47,210 --> 00:01:51,860
buy that makes sense, and to buy as many of these add ons as we have money,

27
00:01:52,280 --> 00:01:55,760
and we're going to get all bots to continuously click the cookie to bake even

28
00:01:55,760 --> 00:01:56,593
more cookies.

29
00:01:57,110 --> 00:02:01,760
So the goal is we're trying to max out on this cookies per second rating,

30
00:02:01,820 --> 00:02:05,030
because the more of these add ons that you buy,

31
00:02:05,030 --> 00:02:07,280
the more often that you click on the cookie,

32
00:02:07,640 --> 00:02:10,729
the more cookies per seconds you can bake.

33
00:02:11,810 --> 00:02:16,810
So basically what we want to do is to not even touch our mouse and use selenium

34
00:02:18,440 --> 00:02:20,180
to play this game for us.

35
00:02:20,360 --> 00:02:24,230
And we're going to try and get some high scores by cheating basically.

36
00:02:25,160 --> 00:02:29,990
So the goal is to max out the cookies per second,

37
00:02:30,410 --> 00:02:35,410
and we're going to be playing this game by clicking on this cookie automatically

38
00:02:35,690 --> 00:02:36,680
using selenium.

39
00:02:37,100 --> 00:02:41,330
And once we've clicked for five seconds,

40
00:02:41,360 --> 00:02:45,620
we're going to see what is the highest value add on we can by,

41
00:02:45,950 --> 00:02:49,220
and then we'll buy it to help us with the game.

42
00:02:49,730 --> 00:02:54,110
So the goal at the end of the day is we're going to run the program for five

43
00:02:54,110 --> 00:02:56,240
minutes. And at the end of the five minutes,

44
00:02:56,510 --> 00:02:59,180
we're going to check our cookies per second.

45
00:02:59,800 --> 00:03:04,090
And we're going to compete with each other on that number because of course you

46
00:03:04,090 --> 00:03:08,770
can get selenium to play the game in different ways. So what I recommend first

47
00:03:08,770 --> 00:03:13,450
before you get started with the project is just to head over to this link

48
00:03:13,480 --> 00:03:15,070
which is in the course resources,

49
00:03:15,310 --> 00:03:20,310
and actually play the game first as a human so that you can understand how it

50
00:03:20,350 --> 00:03:25,350
works and see how these add ons really help us improve our rate of baking

51
00:03:25,930 --> 00:03:29,950
cookies. Pause the video now, head over to this link,

52
00:03:30,130 --> 00:03:34,090
play the game for maybe five minutes and then head over to the next lesson where

53
00:03:34,090 --> 00:03:37,720
there's the full instructions for how to complete this challenge.

