Tip:
Highlight text to annotate it
X
portable quotable out my face."
I might just say I'm just saying,
and a half,
and
the
young lady just
and very stunned to tell you today that I'm seeing are all old and crew.
And I left my computer at home.
So,
I have an old
old laptop appears
in a fight if it slowed because of the old
- need I apologize in advance if it seems if it's not their
here is the
land for the next two weeks.
This week
next week.
Of those leaders complain paying real close attention
off your happens next week
for
the
if you look really closely.
Yet
act is
so this page
for
the
pair
of
damn, we have a test of week from Wednesday I
yet
we go I'm sure you're all aware that boggles through the day before.
The idea is that the material that we do this we
that will be part of bottle is stuff that would be on the test
that tests are essentially
cumulative level emphasizes stuff is later dismissed the talk more about that on
Monday
and end later this week is part of the
box for this week.
I will, I will stop to make sure that I can see if there are for our questions
about the cookies I will
answer them by one and make sure that I've got the plan
that I've
done Bob.
Can even work in an EP case for why
it's
inbox there are lots of classes.
In many classes, as a class of all those classes can make it hard
to understand what's going on so want to make sure that we talk about
trying to get a handle on
what the key themes are that you're working on because that's kind of
the engineering side of a
and then there's the whole recursive backtracking part that you need to do
to find words on the board. It turns out to be
not a time of code, but tricky code because it's recursive recursive and
recursive code is often tricky.
And don't have my laser pointer is it in my backpack, so I'll use my
TV now.
\New-Line Classes,
we have not talked formally in this
class about inheritance,
and there are many examples of inherited some and spend some time discussing why
we use inheritance
in general.
We in the
software design engineering community and why reducing you to boggle in
particular and how to kind of understand it.
There are lots of
single purpose classes like there's a more self class and bottle
you going to need to use that
there's a block or more class and you're going to need to use that
here's a
game is the acting for members for why each one of these is designed to do one
thing,
ever going to talk about in a few slides just what that's about
and as it says here,
because there are these may be
single-purpose classes,
and there's so many of them he can be hard to grok. So if you don't
know the word grok
time I'm now going to put it in your vocabulary
to work in Iraq
is in the sky 's own Wikipedia entry. It's in the dictionary now in it, from
that book stranger in a strange land by Robert timeline of case you need to read
the science fiction, because that's the kind person you are and have read
that one.
I read it years and years without my list to read again soon
and it does use the word grok
grok means to understand in a deep way to view the beauty yet.
I grok that means boy do I seriously
deeply
and profoundly understand recursion is also sometimes hard to get your
head around
in a pothole in addition to having all these classes,
which can make it hard to understand how that fits together.
The code you write, which is not that much but it is recursive and recursive
code is also sometimes
hard to get your
head around hard to grok. So while I try to make sure we have progress towards
that
also will try to build a foundation course trees in the current system just as
the
sneak preview for, those are coming soon.
Okay,
in the bottle it and I hope that I given to get this code running
on offensive issues in this old version of eclipse.
But I think I can
bear is inheritance. There's interface is in there after class and some just
can't give you
a quick
quick overview with the idea is
interfaces we've seen interfaces with
comparator.
And we've seen interfaces with some other process that we provide in a idea
is when X. implements Y.
and usher in a job or code to restart a bottle of
if you implement comparable
implement comparable that means you can be compared to other things.
Essentially
you're saying I agree if I implement an interface
I must provide methods specified by many of the
so asked him who is why means act provides that the implementations
because the interface just supplied their signatures
in the interface you see just the method signatures like public in compared to
offer
that for the comparable interface is only one method
public is compared to.
And if you implement the comparable interface.
You must supply that method
enters a contract it has to return negative number zero some positive.
You get the method signature, and there's
a specification for how that works
best with the interface gets you there is no code that you share when you
implement that interface.
You'll be an collector supply the code you don't get to reuse code.
You don't inherit anything you don't get code you just say I promised
to implement this interface
and the reason that you create a interface as it says right here
is to know if the larger program to know that they're lots of things that
have some commonality
and you can use them
in interchangeable ways I continue to make a trade-off between
a
tree map and a hash map and will see that
or a linked list and an array list and receive a
those are the implications of the list interface,
and
there is a list interface and its partner program and deal with lists,
because if the interface.
I supplied implementations linked list
array that
and it called that uses them as
the deal with anyone know because it's the code is written abstractly to
overuse less which have add methods
and contains
10 room move
and set
and get
in because both those list implementations contain the same math and
your code can be written
with the interface in mind,
and still use the different implementations.
Now that interface, and we've seen that before,
abstract classes
and those are
classes in which this"
and what is going to be doing if I overdo it a boggle
is the same idea that's used in Java.
and other Java packages,
where
there is an abstract class that supplies:
to make it easier for you to do the implementation.
Because of our being in the list classes for example and waitlist
an array with
this encoding,
are giving example of a job for you though. list
and
I hope it on facile with this I do not want to update Firefox.
If I go to the help page for our course, I hope I will find.
I hope I will be able to scroll in this weird
way,
Java.
if I look in Java doc, which is the documentation
for job.
2,
and I look at lists.
You will see this is an interface,
and as we've seen before, are you happy. Contains all contains clear at all
bad
equals and get a pass code index is in the last index of all these methods
in abstract lists
for
abstractly as it provides a skeletal implementation of the list interface.
To minimize
the effort required to implement this interface
backed by a random act of data structure like an array.
So if you want to implement array list.
There's a lot of code
that you might be able to
like me use
the 20 depending on what he used bike and ready or some other structure
in the code for examples that you might reuse.
You can see that coming down and looking
you'll have to implement
at,
but maybe you'll get at all for free.
So
some of the methods you get
other ones you have to implement
it if you look back up, hopefully it will tell us which ones we must do.
So get
on, like other abstract the programmer does not have to provide an iterator
with the flaws I can get it set at a remove everything else is done
and are a lot of methods and they're so what happens is.
You can implement
many of these methods in the list interface.
You can implement at all if you have had
at all says and everything in this list
to another.
Or you can do is get a rate over one list for each body in law
at
Islam, as I have one and I get an all
for free,
because it allows me to at
everything so the abstract class provides a home
school
code I get to use or reuse code that the difference between an interface, which
just provides a method signatures
in an abstract class BC code I show you a concrete example to make it clear.
As this, is this wine is meant to be
a reminder and then
something new about inheritance in your mind for
object oriented programming.
When people say, all I do object oriented programming
in Java.
You have to make class and everything is in the class.
You have to do
object oriented programming,
which to most
designers and programmers means you're using hair.
We do not use inheritance really all we do not leverage the
full we are using encapsulation of state and behavior that a class has in it
states
that the instance variable for private variables
and behavior that's the method in our classes have state and behavior
encapsulation
as when he
features of object-oriented programming
has been around for a long time
state is typically hidden
in the instance variables are typically private but they don't have to be
inheritance
is an eye to eye view of inheritance is.
Why would you like the same code twice
what it once and reuse it so inheritance is supposed to be about,
among other things, code reuse, so I can reuse code from one class in another.
I think all the code I need and use the code.
The other thing is supposed to do
is
allow for what has been termed the" principle is one thing
to call methods in another class.
And that's mostly what we've been doing the right methods, they call
sometimes
you need to change a class that you're given a class
and CLS class is almost what I need,
but not quite.
I'd like to be slightly different.
I'd like
this crap that you give him the best if it's so good, but it really is it
on that the tainted little bit.
If you take my and and that works in Java to make you what the linked list class.
Backing up
is pretty good if all you have the following functionality you want to add to
it.
In general is not a good idea
to alter working code.
Like if the job that you are the linked list class has been heavily tested.
One of leave it alone.
It works. It's been tested millions of voters have used it.
Don't mess with a
disservice to start changing code.
You want to mess it off
at you like to leave all this is a small city I know it won't happen that
long.
Maybe
he
would knew and when you modify code when you change it
that you have a ripple affect to exist in the code that we do in the class so
far.
We have huge systems of class,
but if you go out and beat anyone become a software designer on a bigger scale.
If somebody gives you code this fully tested by the same we've tested this
is gone to work, quality assurance process we tell you it is a good
news they want to pay others to change a little bit. I'm sure it will still
work when I'm done.
Maybe not, so the idea with one thing that inherits gets you is,
you can extend a class and extending it means changes to functionality.
With out a modified
and pressed a very good trick.
That means
it's close to modification seem to have the source code, you can't
change it.
But you can extend its functionality
using inheritance with a well-designed
hierarchy of classes. That's a lot of different classes working together.
You can try to achieve with this" principle is a design idea,
and in this course were not
were not trying to be a lot about is all were trying to be about trade-offs in
implementation and most trade-offs
were going to but we wanted to design in good ways to want to show you this, but
this time.
And that's one of the things the" open for extension and change a
without modifying the code you get than the other principle that works is this
what some people have called the Hollywood principle.
Don't call us we'll call you death with agents,
according to move the day I would really like the job really need to use on your
addition.
You did so great, but you know what
you feed it the role will call and please don't call me.
If you throw book on,
and that works with code to the idea is
if you write classes
and write your classes so that other things can call your methods.
Not to make you call their methods
to call off our methods are going to call you wards
that is an inverted principle.
And if you can remember back
supposed to use that you really do understand.
Comparable now
better if you didn't understand comparable only first introduced it because
we said you'll have to implement the COM interface you must write a method
compared to
an end of the site.
But I
will compare to I have to write it and I
will just call compared to
what is that it compares to method call in the string class for simple string
has compared to method
calls in the word n-gram class that you will remark on
there as a hash code method
you've ever called it in the code that you vote
cool.
Call passion of
a master who called half of
the
sunlight or why to write what you have to get called in more of a better member
to
pass that if you are sure I
you have to find what his hash values.
Somebody else called hash code
menus sort a list
to call for doing this sort and both the code that sort in a couple weeks
back code has to call compared to
you to have written code we say if a is less than V. do this.
I'm sure but not ushered
last man is
compared to
in either code calls you have to follow his
finally trying to get about with the often showed up
in Bob of there are many interfaces. There's a high player I I use this
convention on the users in your face.
There's a high player hoops is I all a player I lexicon I poured maker.
Always different interfaces which allow you to switch the
you can switch out one implementation
for another source facilitating in analyzing trade-offs
is all so abstract layer
to abstract autoplay
does have code in them that you can reuse
its
hard to get your head when
there's all this inherits the
image can be tricky,
and someone try to show you what's going on,
because he here is
that the date the good we can boggle which has as boarded to continue it quite,
but stuff happens
back in who we is written
so that you can change out the players there can be a human player
that can be a computer player
is if there can be a computer player bitten with two different
ways of playing like lexicon first and board first and because
these are the code is written in terms of interfaces.
It allows you to switch out these different implementation so facilitates
changing implementations.
So were going to see that bottle of
our comeback is both intimate.
There is a understand the Bible code
. This inheritance concepts,
but there's also backtracking
and
backtracking to use all little
in recitation.
And now one of show you some, one classic example of backtrack a
and S. with that question for there about
and then will do
on optional HP people do most of it so you can see that example back to this is
what happened when I schooled backtracking
and the image search I got these images.
So among the different things that are clear for backtracking are apparently
aircraft have a problem called backtracking.
Apparently there's a book of poems called backtracking
backtracking is used when you tried to place queens on a forecast that this is
it says in Queens and really show you a machete that code
and backtracking is what you do for those of you that has ever done a sudoku
puzzle.
Raise your hand, I've never ever done is build in
is only one person raising their
always what everybody else, raise your hand, you've done one this week.
It's okay
when you to sudoku, since most of you got to the one gentleman that doesn't
know about it I'm sorry and would talk about it but I bet you understand
the
yet to put these numbers in so that there's one and
the way many people do sudoku saw you post all I know what to do and it is
record numbers to lose
S. like Carl Dallas would do all the people
when they try to solve sudoku puzzles say I know what goes here shot out for in
that location,
and it is a well as I could afford here, what happens there or
what happens to you your
okay it works tentatively approved for it later turns out now turns out I
can't really put before here I race it in a kind of a number
that is backtracking
backtracking and it is the idea where you try something.
You see is that hands out it doesn't lead to success.
And if it does your good,
and you're done with. A dEFi will undo the move and try again.
So that that's the key thing you backtrack and need to try something.
It's more or happens as a result of that effort,
if it doesn't get out the need to be able to undo your attempts
and try again best to keep being the fact
backtracking is used a lot
in
computers playing games.
Some games you don't need backtracking
some things
you can just try everything
and then use the best one for other games you can try everything.
Sometimes you need to find out I write this to be good and tried out and see
what I
did the old days some people still know about predictive texting back.
Predictive text is anybody still do predictive text in
a routine I
know a few people used to be a preferred are smart phones.
Everybody knows that now
is 17 times, and if you have tried to tax somebody
with your keyboard on your little phone and you get this to auto correct me. Go
watch
, although corrected that word,
making that happen in the
vision is happening to me. I never made by posts I have a smart phone.
Stop talking in the about AutoCorrect
how to wire
how I do like what it says did you make media just means a
matter what I typed in things and the hard.
Maybe it knows me really well.
Maybe that's a series of works in series if I need a map of
area and are in
is the first to succeed try try again this is what backtracked in.
Sometimes a backpack.
Sometimes we don't need
to compute what else can you play chess.
You do any of you
play tested the computer was playing as well as it can and read it
to
the business into your probably right close to being a grandmaster
is my understanding he's even chess programs are seriously good.
If you put them on their highest level you cannot select back and downs that I
could play test against the not so smart, because as cover for him to be given
all the top.
Or I like how I could be a good competitive game,
and it does
test programs are using
some form of game feature shall see that later.
When you'll look at her room.
When you look at her roof in Google maps you want or whatever other map you use.
You might find you the optimal route.
It might not, it turns out it's possible to find the shortest route
on a map
without trying every
if the well known out with them will probably see the end of the semester.
Given a map with all the routes laid out, you can find the shortest path from
here to there,
reasonably fit reasonably efficient.
You can find the best chess move reasonably efficient efficiently.
The best for you to find good enough it would be most people.
Interestingly, you can find the longest pass
you by the first half and really fast.
You can find a lot about what I can go from here to New York.
I want to go as I want to take as long as possible.
It turns out that's actually hard to do the
you can find Wallace, but the guaranteed long as one
not so PC will see the
often, to increase a comeback if I think we
says that the class you can use lists completely useless
has no utility whatsoever example of backtracking.
Not like in a cool chess program or predictive texting or something now.
But if the class
so I'm sure it to you because it's a class
a and it's also so short and terse and it's easy to understand the
backtracking of
the idea. It is
given at a chess board,
and
can you put Lee in every row over every, take your point of view.
So they don't attack each other
as a 4x4 chessboard and says he don't know how Queen 's work.
A clean attack anything
in it,
anything in it slow for anything on his back and
if you don't think there's a dance come in here and get out and look
at the Queen game is really cool.
You probably could become a cheerleader just do it
for
the
war you could see no ships at sea.
These queens don't attack each other.
I hope the diagram shows
article is this a other two quizzes and drop
no article is the same problem
know are any claims attacked into the dagger at
no.
This is a
classic problem and their two versions of one is.
Can you do it and you should always yes if you bigoted 4x4 do what I squeezed
out how to see it
that someone probably just do what once and I'm satisfied
in a problem related is really you can do it. How many different ways
, different ways can you put for queens down or five queens down or whatever
Queenstown
and
if you do of Wikipedia.
You can go to the Wikipedia thing for the Queens,
and it will value
by crack and see what a freestanding.
And it's got history eight and it tells you
there could be up to 4 billion.
But for only 92 solutions
therefore not in different ways of putting queens on a board
but only 92 to half the queen pack to
only 92.
Only 92.
How do you do that you have six more all for really a
French expertise of those 4 billion
isn't working to market the work that I take a long
and I think along and this is a clean presumably somewhere in here. It's going
to tell me about in Queens,
where old look. It's
in our industry solutions are there
for eight claims ,\comma and if the solutions are there for twenty four Queens
etc.\et cetera.
I happen Hassan clever NATO
code
that I believe you got to hand out a
console, going to run.
And here's how: this is so cool.
It's trying to flip the coin is that the queens doubt this shall anywhere try
like
they are not out out
to know that now and have to backtrack
to not place this one if the green. it's showing you
with what I is too fast for you a slogan of
what we have some one
bowl I can't know there can't go there again, though there'd can
go here to how I armed in this one time to
how I got to
give an AP for their out and do this with an unknown known
to look a bit.
If you can
no know wrote by no row oh.
I do I work I don't cool was an work again and
luckily for me.
There's a fast, but the
and
don't tell me -- not for
the income
and
more difficult to see out works
to get to weigh someone I have to have it on his PowerPoint slides right here
to -- look at it in a program.
Here's the key of what I want to use this to understand that tracking
and if to prove that we understand backtracking
or going to modify the code and see how
this right now it's stopped
after places the queen is one
to one try to understand
this part of the vote,
which is in Queens. jobs.
Here's
the key idea.
The key idea.
The key idea
that the idea of the key
part of new
Michael Moore at the sequence of call.
And I would try to place the Queen in each call,
and I were to try every possible role in each column
to live in the very first column in the
very first queen I put it in the off her left hand corner.
And now is it safely placed in a column.
Check now I go to the next, connect to clean up their
no same row
character to clean that you note back and check
commitment to clean down there in the case year for UK sets.
Not enough of a picture this clean was here
to interest, can go here.
No
. Oh here now. Oh here yes
and any low columns they now say wrote no dad to attack no city wrote no
diagonal attack with this one
tries here
and once you place the queen
in a column you try the next call.
You try every possible blow in that column,
and if you place it.
You try to that,
and if you can't place if you say no.
And you essentially return each
call
you call it saying you are doing this,
yes,
and try them to come no
in go back and ask what this code does.
I want to know can use solve it in a specific,
and I start the process off by saying start off with column 0.
Can you put it in column 0,
and I try every row
on a tried and rewrote you can see my blue moves over every row.
And if you can place the Queen
in the road that changes as this loop iterates if you can place if we
in the specified column after proud or not if, as a friend.
I would try every well if I can place it
if it's safe it's means it's not attack.
If it's not
putting down sad because we
at that location
just might try I'm trying to save the Queen.
And then
see if you can solve it with the next,
so I successfully placed the Queen in this column.
I
did my recursive friend can use all the next,
and my recursive friend tries in a different, and I was in
you and me yeah I can get my recursive friends is yes, I can
than I did to
but my recursive friend says I'm so hard
I tried to place the Queen
and asked my friends Myra Christopher and they fail so high in a daily
arm reporting back and you know I can do it
me it as and as in the program. I don't get upset.
I get so that my friend couldn't do it.
I do say really you couldn't do it well. I had just placed to clean here.
I guess I need to take the queen off and try again
tonight means take the queen off the place. I just put it
in and continue my local trial in a row tried this well if it works recursively
and I'm done otherwise by the next row.
That place acquaint the curse if I succeed I'm done.
Otherwise, I can't place the queen can continue
any questions about that:
yes.
And
I requested was if I can't place it in this column while I ever voted in it,
the answer is.
You would,
because you only will I go to the next, only
if I placed a few of the tax code is as if it's safe to place the Queen
put it down and the curse
is finding out if it's the first is the place to get no no no no no no no
no
every time I look in that movie and says if my board safer place if every time
it's not safe to place.
I never recur and we'll are returned after my move is done,
all because they never placed it so I never make a recursive call if I try every
possible want to say no
and then
I return it to this whoever called me, which is probably some column and a guy
that knows they go well I better. Take m, we often try the next one.
So let me when you run that again
dummies quick this.
If I come into Queens
in Queens, is this size is eight
if I try to make the signs
tend
to
need to see if I speeded up a little bit
and also to
be go here now. Go here.
No no no no systems that move down
to row row row your boat.
This one fails in this one goes down, so it's time to try if you can't
succeed.
The column that made the call has to go down the next,
and if you want see if it succeeds you to sync and go into a fast and does.
And here's the code
and is
the rod of this program in my console.
It shows you
the board and told me that the number of ways to do. It was no
animated holding a number of ways to do was not
is because
in my clean code it down.
In my Queen code, I just showed you how I try and show you that I'm very
bad at
scrolling
this about this on my screen.
Bath mat that was all like we did every questions about this method
to
yes where is it that it goes back. So what is at question two ways.
Why does this make no recursive call, because remember recursion
used to things that happen.
You have to have a base case that makes no recursion,
and you have to make sure that you're making progress towards that base
case.
With each recursive call
to the first thing I want to do is state is there a path
through this code
that makes no recursive call.
And there are two paths I to conceptual pack
is an easy path was the easy path to see that the person called it just does
what and what is call people to bookmark us was that the
return true
if you think about the
name column 0
them in column one. I have a 5 x 5 for Ben to
the three I placed the queen and it was the queen and for that music queen is
safely placed in 01234.
I place the clean and calm for
an idea that if I successfully placed the queen and calm for
if I did just because it is one it was safe to place a new column for.
I'm a recursive call on column by
which immediately returns true because that meant there are no mother, and on no
other call
for my column is often in the border I'm done I don't make any
recursive call to deserve returns true
with
this as I get a return to I return true average in true Irish and true average
for true goes all laid-back and unfold because remember
there are more
different
recursive clone person that one of column 0 calm one
column 2, three
, four and finally column 5 but that immediately returns
in the most calm for civilian UK. I came to return true return true return true
returns true return true.
Where else are no person calls may use one other thing for there were no
recursive
calls are made
one and conceptually is the
look at that code that no recursive
calls are
in hate.
Here's the recursive
and
what the description of a pol would know a person called in
a
move through the loop and I never make a recursive call with a
a few that are made at a assault back the curtain call.
How can it be
that you'd never execute that lawn
out to be the never made the first of all
a
bit must be the case is that
the
this film a blank and I'm not speaking the more it is and is just too if
you never make a recursive call it must be the case that in this column
for
is not safe to place it in any low,
because it is just a else you want to doubt an evil curse.
That's what sets if you can place it if it's safe to place it
went down and recurred.
So it is never safe to place visitors according here is the queen hear him on
his back and now I'm on this diagonal might get I got every pile of life.
No.
So I can put it anywhere.
I exit the loop and I return all
supposed on Palm six I can't place it
in columns that no no no no no no no no no I make a recursive call
and report back
our payback to who will call column 6
was a calm amid the call :\colon six
. do I know
spoke a
other columns by I get back
no matter if you do not give him a pass
to
if I get back no.
If I get back no
, take my password I really know what you are
how I did just that the Queen and I didn't just put the Queen down because
of the safest places to sit the true
know take it off
and go back and will try the next row,
because it is time for this little
bar changes
in
if I do the following.
I have this convenient
uses variable in my town,
which is supposed to represent how many ways are there to place the Queen.
Unfortunately my count
is not set in the constructor
is a job that
is not set a value in the constructor and it's as if this variable when a
value to automatically get
a
zero or one. I have to get
to know if you fail to initialize an instance variable in the constructor, you
will be initialized for you
0I
never change my town full of all uncommon in.
Now I can increment the
sin I can report it back to what I write this.
It so came home and all the things run
in the and
it printed
number of ways 10 and I happen to know that according to Wikipedia there far
more than 10 ways.
And there's the issue there that a lot of seconds here's my queens are
my queens to change this back to
898 this list was mostly for a late night until is how Wikipedia said.
I hope so,
in our reviews I'm going to
comment out return true Monday began
a number making Koufax, we
what I would see that happen poll conveniently, but soon I consult
92 way as to what they must be true
to.
How do you know
that this morning, I didn't go to edit the Wikipedia
is a 92,
because I know my program printed guide to
want to make sure that you believe that a program to write a
beautiful, but I did
what was the difference why do I now get all the solutions, but I didn't
get them before
because I commented out the line returns true.
Which means
after you successfully placed all the queens
in cricket, and she and I want to do more
before soon as I placed a clean with its stock
picks stock
plays the Queen for a curse on place the Queen
question about that quote
and
not yet a form of a return to sit them are 10 ways your question is going to be.
What's up with that
whenever my feet of off of the headway.
Now
that the answer is to have
it make sense
for the reason is that they are 10 ways because of a hand
in every question.
No one has any questions you were born yesterday.
Really,
just
know? And why not I. I
about 10 pounds
a
update on the issues he
is fine if you quit your real question that some don't want to know why
Serengeti don't worry.
The questions I hear.
Yes, my board on the question was how it interfaces is is very well and I am not
on a slow game.
Context is used to has asked senators to call an interface,
and you and I know that there's no close to how he and his affair with an
interface and the answer is yes but you board the Wii is.
It's a real class and guess what implements.
It was the eye could use the interface and how I know why.
It was I. Queen city
two days I can do it
is because that's how it works.
When you happen is we have some that implements an interface that you get
a
wife that's just my insert and I know is not enough of us what you get why
do you think 10
before because it's not always in the hands,
and it said
in his last column, I can place it
at a discount
and is it, I hope the recursion of each recursive while what they did build
it on that count with a 10 x 10 boards in Japan.
And each recursive call
on that.
I asked the return true
to
other question, let's get to block.
This gives you a quick quick quick quick
to
just on our runner for 13 seasons is 9233 is really what I have changed all of
those
of you in a
artist and all the stuff are talked about the slide is there so you can remind
yourself what are the key features in fact, that
you enumerate every possible move you try every possible one.
You do what you've are cursed, if it doesn't work you undo
will see that later with the contact hole will see it with
maze solving
summary in aware of choices try one of them do it.
If she would force meaning you try every possible move
now in an claims thing I didn't really try every possible move right, Don.
As I could have
placed eight queens in every possible way and when I was done placing them then
check to see.
Is there any attack,
but I was smarter I'd share the attacks as I've went
to.
That meant I didn't literally try every possible way it wouldn't be is
on the board and always
that one of the two queens in the upper left corner next to each other.
It can't possibly succeed.
So, what kind of made sure that as I went.
You don't try a calm and let everything is okay,
that that's a big difference in trying literally every possible one.
I was smart
love of a bottle
bottle get what the Bible program looks like
them to show you a few days
and the next time to do the
ATT does on the question bears the words now and if you have fired a part of
take a look at it.
He never played before local arguing for treat it so much for your
now there's a word now is it every questions about why that's the word
now
in boggle you can connect any killed
with any of the few stores offer a
vertically or back so I start with that and
I go and blow you and see a time and
any questions about why that were now
when you write us boggle games
for Svalbard was no fun to play against a computer can find every word on the
board about 2 seconds
is literally no-fly
bottles for the latest of the humans or you might boggle because they were
different.
If you were with friends, which is like
a travel against the computer you would
invest the computer was programmed to play poorly,
because the computer can try like every possible word in no time to
do so in this bob again
best with an half you're going to say all let me see if I can beat the
computer answer no.
Let me see if I can make the computer play faster
-- the human.
You get to play so if
I try to play boggle and I'm not sure if I have the bottle program year.
It would be found with the idea,
Bob, this is the fault of over nine.
But maybe it's the same program
is find out
boggle me
run
to
the other I can ensure a word that doesn't work because I haven't
written any code.
Hey, I know what word is out there more and all are the
not onboard yes it is a hot tomato
and onboard
about stupid head
now and not is how
to
did it to the claim that you can see the
if you were if you'd finished running the program.
The computer will show you in its column, I have zero the computer has to do is
play here all it's worth
in which a
man in the first of the programming you get
the new get lexicon first auto player completed for you.
This is an old version of the program where giving you more than a dot in 2009
in two dozen nine had to write this one. Now were given the
star one status code is ugly and wrong and if we
maybe I could start and get it to come and
here it is in the sign
bottles with the stall this project for this year
and see how it works. Download go, let's see if I actually have it here.
This is from 100 if all 11 unfortunately I don't why this is it
doesn't know that this is Java and not on how to fix it
because it
this is my old version of eclipse
and somehow
I don't understand.
It doesn't think it's job and go to properties it says.
I don't know
why this is known as a Java program on how to fix it is anybody
read
John compiler
is tried as
a
it's because of this source thing he thinks it's a package
to, Queens. I want Obama fix itself
and
will join us far more
cool way to know if you talk to program computers, you know doesn't work
for Marvel
or second job, but I do what you will do right together
is the deal never been and it looks
just like to get that I'd like to get and try to understand all the pieces.
And here's one piece.
I'm not really look at the grid in a peek into the box, look for work on
the bottle for
an first time we are sure you have the pieces fit together and never going to
see if we can figure this out.
If you've already made he a like I'm trying to find a word on the
board and here's
the case you forgot what it looked like when we should
find out more can I make the word
game can I make TH a N.
on this board.
Yes, CH a N.
now there are two different mechanisms that you are going to employ.
When you write a program to play
your one program that says.
Here's how I do find out the worst in the war.
I'm going to true take every word in my dictionary I use the word lexicon
for the
pic every single word I see it, for it on the board is that on the board
isn't on the board.
You got the dictionary first and ask some more
method more,
should we have to,
it turns out it's missing some code and not we'll discuss that
method to relay your every word in the dictionary. How about this for a
different idea
what you start looking on the board and see T.
and H..
There's no reason to keep looking for tea and if there's a warm start to
see any
. And a THQ no note or starts that
have not seen a printer and where to start with T. and
yes, you continue to search with the
direct a word that starts T. a I
is there one US tale for example.
T. a hide the anyway used the word got a program is.
You try to follow every possible path
on the board and see if that needs to work it if it does your.
to two things you do.
Those are two different players lexicon first auto choir
and board first on a player
in the lexicon when you go to the lexicon
in a board to go to the poor in order to experiment with this if you look at the
assignment
wall of omission east of the new eclipse.
I can come here in eclipse
are coming to have a menu.
Where's my eclipse and maybe there is
a
project
generates a job without I was jittery Java doc for this project.
And yes, I want to generate it for bottle.
I want all the public things I world of protected things to
you now whatever I don't know. So just do, you said yes
on what that means.
I went into project and generate a job at doc and got some mornings I care about
warnings.
And now there's a dark directory.
If I go and read Dr. rectory,
and I clicked on
index.
I'm now getting the job the dock for all the classes used in job
search in Bob
so makes it easy to look like the one I can do with a cute and well at Cuba has
a constructor and a get random face method that returns an interface and a job
he
and I care about that. But what about that cool board cell class I heard
that's rocking again in
the sky Colorado,
and his neighbor is a good
bowler for using his neighbor. I do know that was its neighbor until right now,
Bob, or here's a boggle board class. Apparently, I wrote a letter from a
binary search lexicon.
Now I wonder if I wrote and boggled to a
behave of Michael Green, Paul will be known after all wrote it together is
licensed under the gnu public license this rock
that autoplay.
You can't find any words that stick out that polo player I like to see that
autoplay though I don't want that when I want to code the way
and that
bad auto player. yahoo
that although Claire can't find anything.
I'd like to look at the clue auto player
and see if I can make it to some dust were going to be together so you can kind
of understand
how hard was put together.
So I want to see, is there a good auto clear across.
Not actually not good on a player I want to look it
that weren't on board finder.
This you have to did I forget on a player I don't want to try one and one
of work on
this as I, for if you look at this method sells for work.
The idea is in cells for word.
You give it up there and you get a word and it tells you where that word is on
the board.
How about that, if only I didn't tell you where word is on the board
I'd be done.
This thing says your heart is where the board is not a
big returns a list of more cells to form cells are
the locations on the board of where it is
me running again and yesterday when Porcelli is
to get it from them and this is the same for my cell before it's different.
It turns out that when you try to debug something as random. It's really hard
to the first lady to make my life easier, and this is big to do this in a how-to
but it's easy to miss
the first, do it, but the bottle toward factory
has a random number generator
, or put a CD in a random number generator.
So to get the same board.
The same sequence of board every time to read the
book of random number generators work is based are some random spot in the go to
the next or in a spot in the regular way
as to how I could count the atoms colliding in the room
and give you their pseudorandom number generators. Now I just changed it so that
the random number generator starts with 1234.
That means every time I run a bottle.
Check out the board,
a RGB
EEPE a day to try to get
a yet I say more now- if a new game
be any more RCS the
R. and I ate are going to get
a RGB cube or RC as a newborn or not it's the same brand I say it was every
top
is very helpful indeed looking.
Let me show you how helpful it is
hard like to know where the word arm is on this board
is a armor
on that board
couldn't even remember it for me please if at
where's the pay and board sell. It is the first row in the first,
it's zero zero P. a six zero zero
it's 00P a 600BR601
in the end is at 11 is ever a half at
zero zero
000111 for arm for our fur arm for our
okay.
Here's how I write code the first thing I say is I want
to make
the new Java class.
It tells me you how to did I need to make a class of good word on board finder.
I want to implement a specific interface.
I want to implement the high word
on Guam and the beast in the BS when I want.
I'm ready to make it for me and my parents go for finder and it knows I
must get that message.
Here is what I'm going to do
first on the import Java yield a star
in another state know what I need to make the list of board cells
is a new kind is less is less a class
is less to class and
its interface stock swap, return... this will never find a word, but here's
how clever I can pass
it the word you're looking for is equal to
our
time and know-how to find it.
My fingers are too quick so you
are making new boards sell at 00 is not the first place is not really a was at
00
and was a list that bad new for cell 01,
and I say was that at new board.
Cell 11
on this request is about my code.
As I called to find the word are correctly
on that board I don't know I'm going to try to find a
ongoing to bobble made wishes configured with a bad word on board find.
I like it to have the good word on war on
Jack Sosa. 5 mile high to low boggle board factory uses same sequence of random
boards every time 154.
I created a good more done for fine if I support our
and now I have one other thing to change and that is my lexicon first auto
player,
which I did to you.
It uses that word on board finder I'd like it to use the good word on board
for.
And now I'm ready to go and I think my computer series to play the game is
seriously played the game
watch.
The sound off,
and I did find are all watch this
and I think that's like.
Check out an index for the found on
and if you double-click a quote from the vice
arrive at the start of a woman undone. Maybe
a
five star every single top
is really good at finding our
actually look at the more difficult to hire the right actually look at the board
game didn't look at the more.
Now it's just that. Now, I like some reason just another word that I can
find on that same board.
Other than all our
without looking at the ball, you should know another word I can find on that
same board.
In addition
to a long
did
it in a mass of humans and is not part of a great and I'm pretty confident
if I can find our
IT man.
Oh,
and also the F. word. equals
ready down.
Is that now words that are
zero one right you board itself 01
followed by the gays, which is it 00
followed by the new board self
at one one
at 11I and so call for this one. I think I just eventually
own extra,
phone action( though I hit the wrong keys.
This run this one I'm pretty confident, to find a lot of words
to
I I I I I I
want to find him how bad and as you know it will find it on any board that
it's not a
good source of like the drill, DR I T. could I not confined to read
up and I hope you could,
what you need to do
care how your code is going to find the word.
He
otherwise said this is in the how-to as well, if I can't find the
hardest pound the keys can be a good work to do is see is the on the war
summer and try every possible cute.
And as if the heat of the essay out maybe I can make me here.
And this is the key in the supposed to be in a air to get
at your speed, and here's a factory below.
Not to say if I would often eat a
that I need to find every neighbor of a
covering neighbors are there for a 14, a possible neighbors are there
for every board you
to
be up down left right back and back on Iraq.
For no ominous see is that I see there
and I may be in a
time to say is that the TV.
And as the rest I'm not
if there is undone
in some time to make each from trying to make each
eye making me. I made to pay for ever and ever look for the see.
If I succeed I will create to find how to exceed
icon next neighbor is backtracking
what you're going to do
it for each
character in the words are trying to find out what a good word onboard fine
for each letter in my word, look at the neighbors
on a look at the neighbors our finest range asked
, looking every well call him online for
everyone
and look it every single role,
to
this is in the house to
this is the key. \New-Line Right here,
this recursive function is a recursive helper function for good work on for
finer
on our look on that board
at rolling calm
heard that word is sown in my day
at index zero is my first call.
I'll look on the port
act will call
for,
and sure with the index is, I'm looking for that speak at
if I find the best look for a case at every neighbor
and
that means you to change as