Flash and JavaScript are required for this feature.
Download the video from iTunes U or the Internet Archive.
Description: This lecture covers strategies for finding the shortest path. We discuss branch and bound, which can be refined by using an extended list or an admissible heuristic, or both (known as A*). We end with an example where the heuristic must be consistent.
Instructor: Patrick H. Winston
Lecture 5: Search: Optimal,...
PROFESSOR: It was written about Route 66, which used to be the main highway between Chicago, Illinois and Los Angeles, California.
Very famous highway because anybody who wanted to go across country always took route 66 because it was the shortest way to go.
And the question is, how do you find the shortest path?
Not just any old path or a good path, but how do you find the very shortest path?
And that'll be the subject that we're going to discuss today.
But route 66, I lament its passing, but it's been largely replaced by the interstate highway system that was created by President Eisenhower.
Guess why?
Let's see, maybe the ROTC people know.
You know why Eisenhower created the interstate highway system?
Well, in public affairs, of course, there's always a distinction to be made between the explanation and the reason.
The explanation was-- AUDIENCE: To move weapons across the country?
PROFESSOR: Well, to move nuclear weapons across the country.
Let's put it in, sightly, more benign terms.
Eisenhower had observed that the German army was able to move its troops rapidly, even though we bombed their railroads into oblivion because of their auto bond.
So Eisenhower conceived that if there were ever an invasion in the United States, we too would want to be able to move our forces around on a highway system.
And consequence of that, we have a pretty good highway system and pretty awful railroad system.
It's interesting.
I'm a beneficiary of that, in a funny way, because I'm from East Peoria, Illinois.
And I was surrounded by the factors of Caterpillar Tractor Company, which made all of the tractors that built all of those roads.
So my high school spent money like water from that huge tax base of all those factors.
Anyway, today we want to find the very best path, instead of just a good path.
And like the last time, we'll deal with, both, an example that we can set our program to work on.
By the way, can you find the shortest path between S and G?
Would you like to bet your life on the shortest path between S and G?
Probably, not.
With your eye, you can find a good path.
But you can't find the best possible path.
Today, what we're doing is probably not modeling any obvious property of what we have inside our heads.
But being able to find the best path is part of the skill set that anybody who's had a course artificial intelligence would be expected to have.
So we're going to look at it, even though it's not like many of the things we do.
A model of something that's, probably, going on in your head.
So we're going to use, both, this example from Cambridge and our Blackboard example.
Let's see, we have to caution ourselves.
Tanya, is search about maps?
No, it's about what?
Starts with a C. And the next letter is H. And it ends up being choice.
So we're talking about choice.
Not about maps.
Even though our examples are drawn from maps because they're convenient, they're visual, and helps understand the concepts behind the algorithms I'm talking about.
So let's start off by looking at our classroom example.
And I did something today that I neglected to do last time.
And that's talk to you about what I meant by heuristic distance.
It's those pink lines that I just drew on the map.
We're talking about the distance as the crow would fly between two places, even though there's no road that goes between those two places.
So in general, and we discussed last time, it's best to get yourself into a place that's close, as the crow flies, to your goal.
And of course, that's a heuristic and it can get you in trouble because it's not always true.
It would appear that being at node E is a good place to be because it's not very far from G. But in that particular case designed to illustrate the point, being close is, actually, not a good thing because it's a dead end.
But in general, it's a good thing to be close.
And we talked last time about hill climbing and beam search, being close was the objective of those kinds of searches.
And at one point, in a beam search illustration, we had C, B, A, and D. We had paths terminating at all four of those nodes as candidates for the next round of search.
And we decided on the basis of these airline distances to keep D and B, and reject A and C because they're further away as the crow flies.
Now, I repeat this even though many of you have had this fixed already in your tutorials because we're going to need this concept of heuristic distance today.
And I wanted to be sure that that point has been clarified.
So now, with this smaller map I imagine you can do, by eye, a determination of what the shortest path is.
What is it, Juana?
Can you help me out with that?
AUDIENCE: S, A, D, G.
PROFESSOR: S, A, D, G. And if you add up those distances, the distance is 11 along that path that goes from S, first to A, and then to D, and then from D to G. So Juana asserts that that is the best path.
And we're going to treat Juana as an Oracle because we're going to follow, in our initial attempt to understand these algorithms, a very important principle of problem solving.
And that is that, if you want to solve a problem, the easiest way is, usually, ask somebody who knows the answer.
Or Google, which also, probably, knows the answer.
So in this particular case, we believe that Juana knows the answer.
And she said that the shortest path is S,A, D, G, and its path length is 11.
But we don't trust her because we're applying to the same medical school and she may be trying to screw us.
[LAUGHTER] PROFESSOR: So we're going to be very cautious about accepting her answer until we've checked it to make sure that she hasn't attempted to delude us.
So how do we go about doing that?
Well, one way to do that is to check to be sure that all other possible paths that we could develop end up being, for sure, longer than the one that Juana has told us about.
So she's told us about S, A, D, G. And it has a total path length of 11.
And now what I'm going to do is I'm just going to develop the rest of this tree-like diagram.
But what I'm going to do is, I'm not going to do it in a British Museum or random way.
What I'm going to do is, I'm going to look at the choice that corresponds the shortest path that can be extended.
So the shortest path that can be extended is this one right here.
The one that just has the starting node in it.
And I could have gone this other way to B. And if I go that other way to B, then the path length along that side is 5.
And likewise, if I look at the path that terminates in A, that has a path length of 3.
So now I've got two choices.
A and B. I've got choices that extend beyond those two places.
So I'm always going to extend the one that has the shorter length.
So in this case, that would be the path that goes from S to A.
So if I from S to A, I don't have to go to D. I can also go to B. And if I go to B, then the accumulated path length is S, A, B. That's 7.
And know that we're talking now about the path, like the accumulated path length, that we've traveled so far.
Last time we were talking a lot about distances to the goal.
Heuristic estimates of how far we are from the goal.
Now we're doing exactly the opposite.
We're not considering how far we've got to go.
We're only thinking about how far we've gone so far.
So now, repeating these steps again.
I've got 7 and 5.
So I'll go over and consider the choices that go through the B node on the path S, B. And that gives me S, B, A and S, B, C. And what are those path lengths?
Well, let's see.
S, B, A would be 9.
And S, B,C would be 9.
And now the shortest path is this one over here.
So I extend that.
I go S, A, B. S, A, B. The only place I can go is C. That adds another 4.
So that's 11.
And what do I know about that path?
I don't have to take that any further, right?
Because the path length, since I've gone on that path already, is equal to the path length that Juana has told me gets me to the goal.
So it'll be foolhardy to carry on because, presuming that these lengths are all non-negative, I can't do any better.
And I can't even do as well, unless I've got a length that has 0 length.
So now that I have that idea, I can quickly finish up by saying, well, let me consider these two paths.
S, B, A can only go to D. And if I go to D, that adds 3.
9 plus 3 is 12.
Nothing else can happen there because that's 12 and I've got a path of a goal that's 11.
C, I can only go to E. It's a dead-end but I don't have to think about that because I know that the accumulated distance along this path is 6 plus 9.
That's 15.
So all of these need not be extended any further because their length, accumulated so far, is equal to or less than a length of a goal.
So I've checked the Oracle.
And although we're applying to the same medical school, Juana has told me the truth.
So now, unfortunately, Juana's not always around.
And I don't always have an Oracle.
So I'm going to have to have some way of finding the shortest path without that Oracle that I can check against.
Let's see.
What can I do?
Maybe I can do the same thing I just did.
Always extend the shortest path so far and hope that I run into the goal at some point.
And then I have to ask myself the question how much extra work did I need to do when I don't have the Oracle?
Let's just try it and see what happens.
You don't have that path to start.
So I just have S. This distance is 0.
I can go either to A or B. If I go to A, I've got a distance of 3.
Here, I've got a distance of 5.
I'll extend the path that goes S, A. That can either got to B or D. Going to B or D gives me 7 that way.
S, A, D gives me 6.
So looking across all of these and extending the shortest path so far takes me back over to S, B. So I extend those.
S, B takes me to A or C.
And those, in turn, have total accumulated path lengths of 9 and 9.
Now the shortest one is S, A, D. You see the pattern.
Now let's see.
I haven't found the goal yet.
So I can ask myself the question is any of the work that I've done so far wasted?
No because all of the paths that I've got so far are shorter than the path of the goal because the goal hasn't shown up.
So when I do my oracle checking after I found the goal, none of that work's going to be wasted.
So in the end, I don't, actually, need the Oracle.
I could just develop this graph by extending the shortest path, so far, until I hit the goal.
And then, perhaps, do a little remaining checking to make sure that all the other paths extend with a length that's greater than the path of the goal.
So if those words are confusing, let's carry on with the algorithm, and I think it'll be clearer.
So let's see.
We've got the 7, 6, and two 9s.
We're going to extend the one that's 6.
That gets this to the goal.
Boom, we've got it.
And we've got a path length of 11.
Note, though, we can't quit because we have to be sure that all other paths are longer than 11.
So now we have to carry on with the same algorithm that we started with.
The Oracle checking algorithm.
And when we do that, we look for this shortest path, so far, that has not been extended.
That's B, S, A, B. That goes to C. That's 11.
So we're done there.
A goes to D. That adds 3.
That's 12.
C goes to E. That adds 6.
That's 15.
And sure enough, we're done.
OK?
Elliot?
AUDIENCE: Does it know that there's know that there isn't a chance that you could have a zero distance extension from the [INAUDIBLE]?
PROFESSOR: The question is, does it know that there's no zero distance length that's coming up.
That's an implementation detail.
This guarantees you'll find a path that's as short as any that you can possibly find.
But there might be others if they're zero-length lengths.
As long as they're non-negative lengths, we're safe.
We've got a shortest path.
So that was easy.
And now we can repeat the exercise with our more complicated map of Cambridge.
First of all, let's do depth first just to recall what that looks like.
That is, certainly, not a short path.
So let's try this idea, which, by the way, bares the label branch inbound.
Let's try branch inbound on the same map.
And there it goes.
Each of those little flickers is trying another path.
So you can see it's working it's guts out to find the shortest path.
It's almost there but it's almost a pathological case.
Or it's almost doing British Museum.
There it's finally found the shortest path.
Now there are some things we can ask about that.
But first of all, before I ask anything about it, I'd like to get the flow chart up on the board because we're going to decorate that flow chart, a little bit, as we go.
So the first thing we do is initialize queue.
Then we're going to test first path on the queue.
Then we might be happy because we might be done.
We might have a shortest path to the goal.
Actually, that's not quite true, is it?
We can't really quit until every other path is it.
Well, that's interesting.
If the first element on the queue gets us all the way to the goal, and we sorted our queue by path length, are we through as soon as that first element on the queue gets us to the goal?
Yeah because every other path must have been sorted beyond it.
And therefore, it can't offer us a shorter path to the goal.
So if the first path is a path to the goal we're done.
Alas, it usually isn't.
So we'll extend first path.
We're going to put all those extensions back on the queue, and then we're going to sort them.
So that's, pretty much, the same as we did last time.
We're always going to put the elements back on the queue.
We're going to look at the first element the queue and see if it's a winner.
If it is we're done.
If it's not, we're going to extend it.

Well, sort of.
But we noted that this did a awful lot of work because if we look at those statistics up there, it put 1,354 paths onto the queue.
That's the N queueing part.
And then it extended 835,000 paths that had come to the front of the queue.
Now I'd like to give you an aside because it's easy to get confused about N queueing and extending.
In all of the searches we did last time, it would have been perfectly reasonable to keep a list of all the paths that we had put onto the queue.
An N queueing list.
And never add a path to our queue if it terminates in a node that some other path terminate in that has already gone to the queue.
What I said last time was let us keep track of the things that have been extended and not extend them again.
So you can either keep track of the nodes that have been extended and not extend them again.
Or look at the paths with nodes that terminate, and blah, blah, blah and been put on the queue, the queued ones.
And not put things back on the queue again.
And I think, last time, I may have put a column in there that said N queued.
It should have been extended.
Even though N queued worked last time, only extended works this time because we want to be sure that anything we extend is a short path.
So the N queued idea doesn't work, at all, for these optimal paths.
So now I want to come back over here off the side bar and say that we're keeping track of all of the nodes, all of the paths that end in nodes unless they have already been extended beyond that particular place.
So we need to decorate our algorithm here and say test first path and extend the first path if not already extended.
Because you can see that in the example I had, so far, we did that same silliness that we talked about last time.
We extended paths that went through A more than once, like so.
Would it ever make sense to extend this path?
No because we've already extended a path that got there with less distance.
Will it ever make sense to extend this path?
No because we've already extended another path that gets to be by a shorter distance.
So if we keep an extended list, we can add that to branch inbound to our advantage.
So let's see how that would work on the classroom example.
And then we'll do Cambridge.
So this is bridge inbound, plus an extended list.
And I do mean extended.
Not in the N queued list.
N queued list won't work here.
So let's see, I start off the same way as I did before.
S goes to either A or B. That's a length of 3.
That's a length of 5.
So I extend A. That goes to either B or D. But B is as if it wasn't there at all.
Oh, sorry.
Hang on.
B goes there.
And those path lengths are 7 and 6.
And now I look around on the board, and I say what is the shortest path so far?
And it's B. So I extend that to get to A and C with path lengths of 9 and 9.
And what's the shortest one next?
It's D. And that goes to G. And the path length is 11.
And what's the shortest one on the board?
The one that has to be extended next.
That's this one that gets to B. But I've already extended a path that get to B. So I don't, actually, do that extension.
So I've saved some work.
But I've got to go over here and do these two now.
But wait.
I've already extended B. I've already extended A, so I don't have to do that one either.
The only one I have to do is the one that goes to C. And that those then to E with a path length of 15.
And I'm done.
So if you compare this one with a previous one, you can see that there might be vast areas of this tree that are pruned away and don't have to be examined all.
So now, just for the sake of illustrating that, I would like to keep track of just one of those statistics.
The number of extensions.
So for this particular example, case one, the number of extensions was 835.
Why don't you see if you can guess to yourself what it would be if I use this concept of an extended list.
See, I'm not going to extend anything I've already extended because it's guaranteed to have a longer path length then something that already got to that same place.
So it makes no sense to do it.
So let me change the type to branch-and-bound with an extended list.
I'm going to turn the speed down a little bit so we can watch it.
It might take the rest of the hour.
Who knows?
Still doing a lot of work.
Still examining a lot of paths.
Well, look at that.
Instead of 835 extensions it only did 38.
So that's a pretty substantial savings.
And you would never not want to do that.
So note that that's a layering on top of branching out.
That's not a different algorithm.
It's an adjustment improvement to the algorithm, and it makes it more efficient.
So this whole thing is based on what I call the dead horse principle.
As soon as we figure out that a path that goes to a particular place can't possibly be the winning path, we get rid of it, and don't bother extending it.
It's a dead horse principle.
But if we look at this example, what's the shortest possible length of a path that's already gone from S to B?
What do you think, Tanya?
Well, first of all, it can't be less than 5 because we've already gone that distance.
So when I say what's the shortest length of any path that there could possibly be that goes from S to D. We know it's at least 5.
But can we say something more about it?
Especially, when we look at these airline distances, and note that this airline distance is 6, and that's a little more than 7, and that's a little more than 7.
So what do you think?
So it's gone from S to B, and the question is what's the shortest path that could possibly be that had started out going from S to B?
11 right?
Because we can't have a path that's shorter than the airline distance.
If there were a straight line road from A to G, its length would be 6.
But there isn't.
So that gives us a lower bound on the distance that we have along that path.
So we're using the accumulated distance, plus the airline distance, to give us a lower bound on the path that we've started off on that goes from S to B.
Once again, let's solidify a little bit by simulating the search and seeing how it turns out.

I don't want to carry both of those things around with me at the same time.
So forget that we've got an extended list.
We'll bring all those back together a little later.
So we're going to forget what we just did there.
And instead we're just going to use this concept of an airline distance and see what happens.
As before we start with a starting node.
We have two choices as always.
We can go to A or B. And the accumulated distance, if we go to A, is 3.
And then accumulated distance if we go to B is 5.
But now we're going to add in the airline distances.
So the airline distance from A to G is a little more than 7, which is 10 plus.
The airline distance from B to G is exactly 6.
So that gives us 11.
And following the procedure we've all been using already so far, we're going to extend the path that seems to have the shortest potential.
Now it's the shortest potential distance S to G. So that must be this one here.
So from A we can go to B or D. The accumulated distance S, A, B, is 7.
The airline distance is 6, so that's equal to 11.
Standard arithmetic 13.
The distance S, A, D. That is 6 plus a little more than 7.
So what's the accumulated distance?
S, A, D is 3 plus 3 is 6.
AUDIENCE: [INAUDIBLE].
PROFESSOR: What?
AUDIENCE: The airline distance from D would be 5.
PROFESSOR: Would be 5, right.
So airline distance, in this case, is the same as the actual distance.
So the accumulated distance is 6.
The actual distance is 5.
So that's equal to 11.
So now I've got two 11's on the board.
And simulating what we'd ask you do on a quiz, we don't know which of those is going to be better.
They've got a tie score.
So what we're going to do is we're going to choose the one that's lexically least.
So B comes before D. So we'll expand B. And that can go to either A or C. And we have to calculate the best possible distance that goes along those paths.
The accumulated distance S, B, A. S, B, A is 9.
So that's 9 plus 7 plus.
That's 16 plus.
This has an accumulated lead of distance of 9.
Also plus 7 plus.
Also 16 plus.
Well, now let's see.
Things are shaping up pretty well because this one has the lowest score so far.
We extend that to G. And now the accumulated distance is 11.
The airline distance is 0, so that's 11.
And that's smaller than everybody else.
So we've got.
So now compare this one with our branch inbound graph.
And you see, once again, we've done considerably less work.
And that, in many practical cases, means that instead of taking more than the remaining lifetime of the universe to complete the calculation, it can happen in a few seconds.
But let's see how it works on the example.
So I'm not going to use the extended list.
I'm just going to use this idea of using a lower bound on the distance remaining, the airline distance, and see what happens.
So this time, the number of extensions is 70.
So it didn't do quite as well as working alone as the extended list did working alone.
So we immediately conclude that the extended list is more useful than using one of these lower bound heuristics.
By the way, this is called an admissible heuristic.
If the heuristic estimate is guaranteed to be less than the actual distance, that's called an admissible heuristic.
Admissible because you can use it for this kind of purpose.
So it looks like the day extended list is a more useful idea than the admissible idea.
Right?
What do you think about that, Brett?
Am I hacking?
Am I joking?
AUDIENCE: I think you're judging prematurely.
PROFESSOR: Why am I judging prematurely?
What do you think it might depend on?
AUDIENCE: The fact that we're using extensions and the extended list pretty much guarantees you can only extend each node once.
PROFESSOR: Well, Brett has sad something unintelligible that I can't think how to repeat.
What he meant to say, though, was that-- [LAUGHTER] PROFESSOR: --in these cases, it almost always depends on the problem itself.
If you change the problem, you may get a different result.
So why don't we change the problem and see if we get a different result?
So instead of starting on the extreme left, let's start in the middle and see what happens.
So I'll readjust my starting position to be right there.
Oops, that's the wrong adjustment.
And we might as well start by getting our baseline branch-and-bound without anything.
And for that one, maybe, we'll speed it up a little bit.
So that gives us 57 extensions.
It's an easier problem.
So let's try it with the admissible heuristic.
That went too fast.
Wow, still pretty fast.
Six extensions.
What do you think this number's going to be?
Closer to six or closer to 57?
Better than six?
Worse than six?
Well, let's think.
What we're going to do is we're going to just not repeat any movements through the same node again.
But it's not going to do something very important for us.
It's not going to keep us out of the left side because it has no idea of the remaining airline distance to the goal.
So let's see if that's true It sure is.
Look at that.
It is, foolishly, spending a lot of its' time doing something we would never do.
Namely, looking over there on the left side.
So this time, the number of extensions is 35.
So in case two, the admissible heuristic does very much better.
In case one, the extension thing does much better.
But wait a minute, would we ever not want to use both at the same time?
We wouldn't want to use just one of these, right?
They both have the possibility of doing us a lot of good.
So maybe if we put them in harness together, we'll get something that's even better.
And when we do that-- see here, the extended list is a layer on top of branch and bound.
The admissible heuristic is another layer on top of branch and bound.
If we put those together, we get something called A star.
So A star is just branch and bound, plus an extended list, plus and admissible heuristic.
So let's go back to our original problem and try A star on that.
We're running this at a pretty slow speed because we're expecting it to be a lot more efficient than the original branch and bound.
And sure enough it is.
The number of extensions is 27.
So look at that.
A lot better than either of those working independently.
Now I can stick the thing in the center and see what happens then.
So in this particular case, the extended list didn't, actually, help us because our admissible heuristic was channeling us so tightly toward the goal it didn't matter.
So it all depends on the nature of the space that you're trying to explore.
By the way, you know how the whole works, right?
So what you want to do is you want to extend the first path and sort.
But not just by accumulated distance.
Sort by accumulated distance plus admissible heuristic.
But what are the theoreticians?
You must be complaining.
Sort's expensive.
Do we actually need to sort?
No, we don't actually need to sort.
What do we to do?
AUDIENCE: We just need to keep track of what's the minimum.
PROFESSOR: We just need to keep track of what's the minimum.
So we don't need to, actually, do that sort.
That's an unnecessary computation.
So instead, we can test, not the first path but the shortest path.
And now you have it.
Now you have the whole of A star.
And now you can go home, but I don't think you should because I'm about to show you that this idea of admissibility, actually, leads to certain screw cases that we're very fond of asking about on exams.
So it turns out that the admissible heuristic, in certain circumstances, could get you into trouble.
It doesn't look like it could because, logically, nothing I've said seems strange or questionable.
But that's because I've been working with a map.
And it turns out that if you work with a map then admissibility is a perfectly sound way of doing an optimal search.
But, Travis, is search just about maps?
No, search is not just about maps.
So we may have non-Euclidean arrangements that will cause us trouble.
So I'd like to illustrate that with the following example.
It's not going to be a large map or a large graph.
 Then they merge at C.
And the actual distances are 1, 1, 1, and 10.
And over here, we'll make that 100.
So it's a kind of oddly constructed map, but it's there because we need a pathological case to illustrate the idea.
Now that's the actual distances.
And if we did branch and down with an extended list, everything would work just fine.
But we're not.
We're going to use an admissible heuristic.
And we're going to say that this guy has an estimated distance to the goal of 100.
This guy is 0.
And this guy is 0.
Now, 0 is always an underestimate of the actual distance to the goal, right?
So I'm always free to use 0.
Is that 100 OK?
Yeah because the actual distances is 101, so it's less than that the actual distance.
So it's OK as an admissible heuristic.
So these numbers that I put up here, together, constitute an admissible heuristic set of estimates to the goal.
So now, let's just simulate A star and see what happens.
So first of all, you start with S, and that can either go to A or B. The actual distance is 1 plus an estimate on the remaining distance.
That gives us 100 plus 100.
That's equal to 101.
If we go to B instead, the actual distance is 1 plus the heuristic's distance is 0, so that's equal to 1.
OK, good.
So now we know that we always extend the shortest path so far.
Did I goof this, or are you asking a question?
AUDIENCE: [INAUDIBLE]?
PROFESSOR: Yeah, when I say actual, it's the actual distance that you've traveled.
AUDIENCE: But that's [INAUDIBLE].
PROFESSOR: So wait a second.
If I go from S to A, the actual distance I've traveled is 1.
AUDIENCE: I meant like, does the map-- PROFESSOR: So now I'm taking the sum of the actual distance, plus the estimated distance to go.
AUDIENCE: All right.
I'm just wondering if the original map has to be [INAUDIBLE].
PROFESSOR: See this is not a map.
She was asking if the map has to be geometrically accurate.
See, this could be a model of something that's not a map.
And so, I'm free to put any numbers on those links that I want, including estimates, as long as they're underestimates of the distance along the lengths.
So this tells me that my estimated distance here, so far, is 1.
So I'll, surely, go down here to C. And if I go to C, then my accumulated distance is 11.
And my estimate of the remaining distance is 0.
So that's a total of 11.
So now I'm following my heuristic again and saying what's the shortest path on a base of the accumulated distance plus the estimated distance?
Here, the accumulated distance plus the estimated distance is 101.
Here, it's only 11.
So plainly, I extend this guy.
And that gets me to the goal.
And the total accumulated distance is now 111 plus 0 equals 111.
And that's not the shortest path, but wait.
I still have to do my checking, right?
I have to extend A. I when I extend A, I get to B. And now, when I get to B that way, my accumulated distance is 2 plus my-- oh, sorry.
S, A, C.
My accumulate distance it 2.
My estimated distance is 0, so that's equal to 2.
So I'm OK because I'm still going to extend to this guy, right?
Wrong.
I've already extended that guy.
So I'm hosed.
I won't find the shortest path because I'm going to stop there.
And I'm going to stop there because this is an admissible heuristic and that's not good enough unless it's a map.
It's not good enough for this particular case because this is not geometric.
This cannot be done as a map on a plane.
So that's a situation where what I've talked to you about, so far, works with branch-and-bound.
Works with branch-and -bound plus an extended list.
But doesn't work when we added an admissible heuristic.
So if we're going to do this in general, we need something stronger than admissibility, which works only on maps.
And so the flourish that I'll tell you about here in the last few seconds of today's lecture is to add a refinement as follows.
So far, we've got admissibility.
And if we want to write this down in a kind of mathematical notation, we could say that it's admissible if the estimated distance between any node X and the goal is less than or equal to the actual distance between X and the goal.
That's the definition of admissible.
As long as heuristic does that it's admissible.
And A star works if it's a map.
But for that kind of situation where it's not a map we need a stronger condition, which is called consistency.
And what that says is that the distance between X and the goal minus the distance between some other node in the goal, Y. Take the absolute value of that.
That has to be less than or equal to the actual distance between X and Y.
So this heuristic satisfy the consistency condition?
Well, let's see.
Here the guess is 100.
Here it's 0.
So the absolute difference is 100.
But the actual distance is only 2.
So it satisfies admissibility, but it doesn't satisfy consistency.
And it doesn't work.
So you can almost be guaranteed we'll give you a situation where if you use an admissible heuristic you'll lose.
And if you use a consistent heuristic, you'll still win.
So how can we bring this back into the fold?
Well, we can't use that heuristic.
It's no good.
But if this heuristic estimate of the goal were 2, then we'd be OK because then it would still be admissible.
But it would also be consistent.
So the bottom line is that you now know something you didn't know when you started out two lectures ago.
You now know how MapQuest and all of its' descendents work.
Now you can find an optimal path, as well as a heuristically good path.
You see that if you don't do anything other than branch and bound it can be extremely expensive.
And you can even invent pathological cases where it's exponential and the distance to the goal.
So because it can be so computationally horrible, you want to use every advantage you can, which, generally, involves using an extended list.
As well as-- no laptops, please.
It still holds.
No smoking, no drinking, and no laptops.
So you're going to use all the muscles you can.
And those muscles include using an extended list and an admissible or consistent heuristic, depending on the circumstances.
And so, I think we'll conclude there since our time is up.
And Elliot, you can ask a question after class.
Why don't you come up and ask it now?


6:00 PM
7:00 PM
8:00 PM
9:00 PM
10:00 PM
Open con: hang out to greet & meet
The Commons
Opening Ceremony & Icebreaker: PowerPoint Karaoke
- Jeff Alexander
- David Levine
You have ten never-before-seen slides on a random topic and five minutes to create an informative and/or humorous presentation speech to go with them in this improv comedy drill. David Levine will go first to show how it's done, then he'll host as we accept volunteers from the crowd. If you've ever wanted to give your own TED Talk, this is for you.
What Have You Enjoyed This Year?
“Bring Your Own Book” Game: bring a book - any book - electronic
or paper
You Can Dance If You Want To: a Foolscap music social
Been to any good concerts lately? Neither have we - but that doesn’t mean it’s been a bad
year for music! We’re putting together a playlist of new music discoveries we’ve made in
2020, and inviting you to share the music you’ve found during our year in quarantine, along
with some of the songs that helped you make it through. This will be a mics-off, text-based
conversation, to let us focus on the music.  Make sure you have eggs, milk, flour, sugar, butter, and either a
cast-iron skillet or 9x9ish glass or ceramic baking dish. We’ll give you the recipe, some
techniques, and a few general kitchen tips along the way!
Greg Bear: The Unfinished Land
Hugo and Nebula winning author Greg Bear will be joining us on Saturday, Feb. 12 to talk about his upcoming book, [*The Unfinished Land*](https://www.gregbear.com/books/unfinishedland.php)
*The Unfinished Land* will be released the Tuesday after Foolscap,
Feb. 16th, 2021
Lunch Break: Mealtime Meet Ups!
The Commons
Group Game: Tribes
This event is on Discord. A mostly-cooperative group storytelling-and-society-building game by Steve Jackson and David Brin. Players are men and women who hunt, gather, and build a society while keeping the kids alive.
A Puppet Shows You How to Look Your Best on Zoom
Look your best on a Zoom call or panel — not with fancy backgrounds but with body language
that will help you communicate clearly and appropriately – and entertainingly - to everyone
who is watching. Novelist, puppeteer, and writing instructor Mary Robinette Kowal will
demonstrate and take questions.
Virtual Tea
Hospitality
- Wing L. Mui
- Stefanie Stadnicki
Stefanie and Wing answer your questions about brewing and serving tea, talk a bit about its
long history, and show off some of their more unusual blends and brewing tools.
Aging in Fandom: You're how old?
- Astrid Bear
- Sairah McMinn
- Mel White
- Tom Whitmore
A lively exploration of the history of fandom with all its foibles and quirks. And panelists Astrid Bear, Sairah McMinn, Mel White, and Tom Whitmore are just the group to lead this expedition!
A Communications Guru Talks About Creativity (Digital and Otherwise)
Howard Rheingold, one of the pioneers of virtual community, shows off his virtual office,
and talks about his artwork, digital and otherwise. Come talk with a Burning Man regular, a
teacher about cooperation studies, and a wonderful raconteur!
Fiber Artists
Art Show
- Astrid Bear
- Syne Mitchell
- Kier Salmon
A maker's panel on Fiber Art, featuring Astrid Bear, Kier Salmon, and Syne Mitchell. They will talk about their work ranging from dyeing, weaving, crocheting, costuming, pretty much anything! Join in the fun, ask questions, and see some cool things.
Game Design of Sidereal Confluence
Sidereal Confluence is an unusual game. Set in an original science fictional world, it challenges players to shape a multi-species alliance to reflect their species’ priorities. It’s a trading game with simultaneous turns, open information, binding deals and nine distinct, asymmetric factions. It isn’t a cooperative game, but the most effective strategies involve working together, making it remarkably friendly. Designer TauCeti Deichmann will show the game and chat about the process of engineering the game’s systems, and how the game design and the setting’s fiction shaped and improved each other.
“Artists At Work” Live Art Show
Art Show
- Wing L. Mui
- Jeff Olhoeft
- Steve Stadnicki
Dinner Break: Mealtime Meet Ups!
The Commons
Costuming
Betty Bigelow, master SF costumer, talks about costuming, how to do it and why. Come learn some basics from someone who really knows how to build a functional costume! Betty is known for her Klingon costumes, and has won awards at multiple SF conventions, including Worldcons. She's also the artistic director of the Shahrazad Dance Ensemble of Seattle.
Creating and Publishing Serials
Serialized fiction is enjoying a revival online in podcasts and websites. Mark Ferrari
(Twice: The Serial) and Curtis Chen (Ninth Step Station) are at forefront of this trend.
They’ll talk about the challenges of writing and publishing serials and take some questions.
The Pros and Cons of Patreons for Artists and Writers
- Chaz Brenchley
- Laura Anna Gilman
Wondering if Patreon is a good way to find underwriters for your artistic career? Authors Laura Anne Gilman and Chaz Brenchley share their experiences using Patreon and building a patron communities to support their work. Find out what worked and what didn’t, and how they produce a steady flow of satisfying content for their supporters.
The Wild World of Calligraphy Inks
The things in the art supply store labeled "calligraphy ink" are...somewhat limited, and in this panel we will explore some other options. Starting with the basics of watercolor & acrylics (including mixing colors and using mica powders), we'll move on to using "special effects" media (glow, etc.) and to applying the unique properties of fountain pen inks to non-fountain-pen uses.
Elizabeth Adams (she/her) is an artist, jeweler, and occasional "amateur chemist" who enjoys finding off-label uses for things and just might have missed a calling in Materials Engineering.


NOTICE: This software (or technical data) was produced for the U.S. Government under contract, and is subject to the Rights in Data-General Clause 52.227-14, Alt. IV (DEC 2007). Copyright 2023 The MITRE Corporation. All Rights Reserved.
Overview
In order to be registered within OpenMPF, each component must provide a JavaScript Object Notation (JSON) descriptor file which provides contextual information about the component.
This file must be named "descriptor.json".
For an example, please see: Hello World JSON Descriptor
Data Elements
Contained within the JSON file should be the following elements:
componentName
Required.
Contains the component’s name. Should follow CamelCaseFormat.
Example:
"componentName" : "SampleComponent"
componentVersion
Required.
Contains the component’s version. Does not need to match the componentAPIVersion
.
Example:
"componentVersion" : "2.0.1"
middlewareVersion
Required.
Contains the version of the OpenMPF Component API that the component was built with.
Example:
"middlewareVersion" : "2.0.0"
sourceLanguage
Required.
Contains the language the component is coded in. Should be "c++", "python", or "java".
Example:
"sourceLanguage" : "c++"
batchLibrary
Optional. At least one of batchLibrary
or streamLibrary
must be provided.
For C++ components, this contains the full path to the Component Logic shared object library used for batch processing once the component is deployed.
For Java components, this contains the name of the jar which contains the component implementation used for batch processing.
For setuptools-based Python components, this contains the component's distribution name, which is declared in the
component's setup.py
file. The distribution name is usually the same name as the component.
For basic Python components, this contains the full path to the Python file containing the component class.
Example (C++):
"batchLibrary" : "${MPF_HOME}/plugins/SampleComponent/lib/libbatchSampleComponent.so
Example (Java):
"batchLibrary" : "batch-sample-component-2.0.1.jar"
Example (setuptools-based Python):
"batchLibrary" : "SampleComponent"
Example (basic Python):
"batchLibrary" : "${MPF_HOME}/plugins/SampleComponent/sample_component.py"
streamLibrary
Optional. At least one of batchLibrary
or streamLibrary
must be provided.
For C++ components, this contains the full path to the Component Logic shared object library used for stream processing once the component is deployed.
Note that Python and Java components currently do not support stream processing, so this field should be omitted from Python and Java component descriptor files.
Example (C++):
"streamLibrary" : "${MPF_HOME}/plugins/SampleComponent/lib/libstreamSampleComponent.so
environmentVariables
Required; can be empty.
Defines a collection of environment variables that will be set when executing the OpenMPF Component Executable.
Contains the following sub-fields:
-
name: Name of the environment variable.
-
value: Value of the environment variable. Note that value can be a list of values separated by “:”.
-
sep: The
sep
field (short for “separator”) should be set to “null” or “:”. When set to “null,” the content of the environment variable specified byname
is the content ofvalue
; for an existing variable, its former value will be replaced, otherwise, a new variable will be created and assigned this value. When set to “:” any prior value of the environment variable is retained and the content ofvalue
is simply appended to the end after a “:” character.
IMPORTANT: For C++ components, the LD_LIBRARY_PATH needs to be set in order for the Component Executable to load the component’s shared object library as well as any dependent libraries installed with the component. The usual form of the LD_LIBRARY_PATH variable should be
${MPF_HOME}/plugins/<componentName>/lib/
. Additional directories can be appended after a “:” delimiter.
Example:
"environmentVariables": [
{
"name": "LD_LIBRARY_PATH",
"value": "${MPF_HOME}/plugins/SampleComponent/lib",
"sep": ":"
}
]
algorithm
Required.
Specifies information about the component’s algorithm.
Contains the following sub-fields:
-
name: Required. Contains the algorithm’s name. Should be unique and all CAPS.
-
description: Required. Contains a brief description of the algorithm.
-
actionType: Required. Defines the type of processing that the algorithm performs. Must be set to
DETECTION
. -
outputChangedCounter: Optional. An integer that should be incremented when the component is changed in a way that would cause it to produce different output.
-
requiresCollection: Required, can be empty. Contains the state(s) that must be produced by previous algorithms in the pipeline.
This value should be empty unless the component depends on the results of another algorithm. -
providesCollection: Contains the following sub-fields:
- states: Required. Contains the state(s) that the algorithm provides.
Should contain the following values:
DETECTION
DETECTION_TYPE
, whereTYPE
is thealgorithm.detectionType
DETECTION_TYPE_ALGORITHM
, whereTYPE
is the value ofalgorithm.detectionType
andALGORITHM
is the value ofalgorithm.name
Example:
"states": [ "DETECTION", "DETECTION_FACE", "DETECTION_FACE_SAMPLECOMPONENT"]
- properties:
Required; can be empty. Declares a list of the configurable properties that the algorithm exposes.
Contains the following sub-fields:
- name: Required.
- type:
Required.
BOOLEAN
,FLOAT
,DOUBLE
,INT
,LONG
, orSTRING
. - defaultValue: Required. Must be provided in order to create a default action associated with the algorithm, where an action is a specific instance of an algorithm configured with a set of property values.
- description: Required. Description of the property. By convention, the default value for a property should be described in its description text.
- states: Required. Contains the state(s) that the algorithm provides.
Should contain the following values:
actions
Optional.
Actions are used in the development of pipelines. Provides a list of custom actions that will be added during component registration.
NOTE: For convenience, a default action will be created upon component registration if this element is not provided in the descriptor file.
Contains the following sub-fields:
-
name: Required. Contains the action’s name. Must be unique among all actions, including those that already exist on the system and those specified in this descriptor.
-
description: Required. Contains a brief description of the action.
-
algorithm: Required. Contains the name of the algorithm for this action. The algorithm must either already exist on the system or be defined in this descriptor.
-
properties: Optional. List of properties that will be passed to the algorithm. Each property has an associated name and value sub-field, which are both required. Name must be one of the properties specified in the algorithm definition for this action.
Example:
"actions": [
{
"name": "SAMPLE COMPONENT FACE DETECTION ACTION",
"description": "Executes the sample component face detection algorithm using the default parameters.",
"algorithm": "SAMPLECOMPONENT",
"properties": []
}
]
tasks
Optional.
A list of custom tasks that will be added during component registration.
NOTE: For convenience, a default task will be created upon component registration if this element is not provided in the descriptor file.
Contains the following sub-fields:
-
name: Required. Contains the task's name. Must be unique among all tasks, including those that already exist on the system and those specified in this descriptor.
-
description: Required. Contains a brief description of the task.
-
actions: Required. Minimum length is 1. Contains the names of the actions that this task uses. Actions must either already exist on the system or be defined in this descriptor.
Example:
"tasks": [
{
"name": "SAMPLE COMPONENT FACE DETECTION TASK",
"description": "Performs sample component face detection.",
"actions": [
"SAMPLE COMPONENT FACE DETECTION ACTION"
]
}
]
pipelines
Optional.
A list of custom pipelines that will be added during component registration.
NOTE: For convenience, a default pipeline will be created upon component registration if this element is not provided in the descriptor file.
Contains the following sub-fields:
-
name: Required. Contains the pipeline's name. Must be unique among all pipelines, including those that already exist on the system and those specified in this descriptor.
-
description: Required. Contains a brief description of the pipeline.
-
tasks: Required. Minimum length is 1. Contains the names of the tasks that this pipeline uses. Tasks must either already exist on the system or be defined in this descriptor.
Example:
"pipelines": [
{
"name": "SAMPLE COMPONENT FACE DETECTION PIPELINE",
"description": "Performs sample component face detection.",
"tasks": [
"SAMPLE COMPONENT FACE DETECTION TASK"
]
}
]


Reduce, Reuse and Recycle
Reduce, Reuse and Recycle, these three R's of the environment is the great way to protect our environment by reducing waste, saving money and less consume of energy.
So what exactly is reduce, reuse and recycle?
- Reduce:It simply means to buy and consume less. Reducing is the most effective of the three R's. Two of the examples of reducing are buying a used good and consuming less electricity.
- Reuse:Reusing is the use of items in other ways instead of throwing out the items that you don't needed. Reusing is the 2nd effective of the three R's.
- Recycle:The last one is recycling. Recycling is to convert waste materials (such as plastic, bottled water, glass, broken materials and more) into a new products.
Benefits of the three R's of environment
- saves money and electricity
- less waste sent to landfill which reduce greenhouse gases
- prevents pollution by reducing raw materials
- allows waste materials to be used to create new products
- conserves natural resources
- it helps create jobs by recycling
- prevents loss of biodiversity
Where to recycle?
There so many recycling center here in North carolina. But make sure to recycle in a good recycling center. These recycle centers below has a positive reviews.
Recycle Convenience Centers in North Carolina
11710 Hwy 17
Maysville, NC 28555
(910) 595-4113
(910) 595-4114
Mon-Fri-F: 7:30 AM - 5:30 PM
Sat: By appointment only
They recycle:
- Wood
- Aggregates and soil
- Drywall
- Roofing
- Metals
- Carpet and Padding
- Plastics
- Carboard and Paper
199 Drummer Kellum Rd
Jacksonville, NC 28546
(910) 455-3022
Mon-Fri: 8 AM - 4:30 PM
Sat: 8 AM - 12 PM
Sun: Closed
They recycle any scrap metals
8007 Pence Rd
Charlotte, NC 28215
(704) 336-7600
Mon-Sat: 7 AM - 4 PM
Sun: Closed
Accepted Materials:
- Plastic Bottles
- Pizza Boxes
- Plastic Containers
- Rigid Plastics
- Empty Aerosol Cans
- Milk and Juice Cartons
- Glass bottles
- Junk mail, Mixed Paper
- Newspapers, Magazines
- Cardboard
- Batteries
- Appliances
- Scrap aluminum, metals
- Paint, motor oil
- Tires
- Computer, Television
- Fire Extinguishers
- Cooking Oil
266 Aviation Pkwy
Morrisville, NC 27560
(919) 856-7400
Mon-Sun: 7 AM - 7 PM
They accepted:
- Cardboard
- Clothing
- Construction Waste
- Food Waste
- Garbage
- Mixed Recycling
- Oyster Shells
- Scrap Metal


Home
About
Get Frenchise
Gallery
Our Clients
Contact Us
More
Profile
FAQ's
News
Warehouse
Careers
Downloads
Order Now
Get Franchise
Home
Get Franchise
Get your
Franchise
Fill all form field to go next step
1
2
3
4
Personal Information
Full Name*
Email Name*
ID Number*
Cell Number*
Whatsapp Number*
Address*
Next
Personal Information
Date of Birth*
Gender*
Fax*
Place of Birth*
Age*
Marital Status*
Citizen Ship*
Previous
Next
Prefrence Information
Applied Francehise Location/Area*
Other Location Prefrence*
Tax ID/ NTN*
Occupation/Business*
Physical Disablity/ Limitations*
Previous
Next
Franchise Information
Are You Doing Any Business?
YES
NO
Are You Doing Any Food Business?
YES
NO
Is this the first time you are applying for a franchise?
YES
NO
Previous
Submit
Our
Franchise
Dolores Webster
CEO & Founder
Dana Vaughn
Architect
Jonathan Mcdaniel
Architect
Dolores Webster
CEO & Founder
Dana Vaughn
Architect
Jonathan Mcdaniel
Architect
Dolores Webster
CEO & Founder
Dana Vaughn
Architect
Jonathan Mcdaniel
Architect
Why choose us?
Our ability to bring outstanding results to our customers.
Contact Us


HAAPCOL, earlier known as H. Al Hoty Establishment was founded in 1994 for provision of high quality materials testing equipment to analytical laboratories manufacturing industries.
Call us
+966 13 8948020
Address
P.O. Box #31729,
AL Khobar - 31952
Kingdom of Saudi Arabia


A tool for tracking the progress of the kittens (and cat{s,z}) in out CodeCatz meetup group
This page will show our awesome CodeCatz members.
This page will tel you more about us CodeCatz.
This page will show all our projects and who is working on what.
This page will be only for cats attending Wednesday's meeting who have their github account setup.


Qualist sidebar
Jhon
Smith
Administrator
Dashboard
Dashboard 1
Dashboard 2
Dashboard 3
E-commerce
Products
Orders
Credit cart
Components
General
Panels
Tables
Icons
Forms
Charts
Pie chart
Line chart
Bar chart
Histogram
Maps
Google maps
Open street map
Toggle
Pin
Background image
Border radius


[onload;file=header.html]
The muzikbrains database lists all worldwide album releases registered with a central authority.
| ID | Artist | Album | Language | Country |
|---|---|---|---|---|
| [blk1.id;block=tr] | [blk1.r_a_name] | [blk1.r_name] | [blk1.r_lang] | [blk1.r_event_country] |
There are [blk1.#] albums avalable here.
Batch versus real-time rendering. We sometimes assume that all Web2.0 sites must be real-time rendered through application scripts and database queries. But there are alternatives.
Write an application which renders individual html pages for all the records in a database table. Automatically render the index page with links to these pages.


This is the Free Code Camp 'Newbie' Developer Survey Form. This form was developed for your enjoyment. Take your time to fill it out completely and we will compile the data for everyone's enjoyment. Thanks!
Sex
What Type of Developer are You?


Home
Hello, welcome to the guessing game!
First Question: Am I originally from Portland? (Y/N)
Second Question: Do I love chocolate?
Third Question: Can I run a 6 minute mile?
Fourth Question: Guess my favorite number between 1 and 100
Here are some podcasts I like:


#include <cudpp.h>
Public Attributes | |
| CUDPPAlgorithm | algorithm |
| The algorithm to be used. | |
| CUDPPOperator | op |
| The numerical operator to be applied. | |
| CUDPPDatatype | datatype |
| The datatype of the input arrays. | |
| unsigned int | options |
| Options to configure the algorithm. |


Sudoku is one of the most popular puzzle games of all time. The goal of Sudoku is to fill a 9◊9 grid with numbers so that each row, column and 3◊3 section contain all of the digits between 1 and 9. As a logic puzzle, Sudoku is also an excellent brain game. If you play Sudoku daily, you will soon start to see improvements in your concentration and overall brain power. Start a game now. Within no time Sudoku will be your favorite free online game.
The popular Japanese puzzle game Sudoku is based on the logical placement of numbers. An online game of logic, Sudoku doesnít require any calculation nor special math skills; all that is needed are brains and concentration.
The goal of Sudoku is to fill in a 9◊9 grid with digits so that each column, row, and 3◊3 section contain the numbers between 1 to 9. At the beginning of the game, the 9◊9 grid will have some of the squares filled in. Your job is to use logic to fill in the missing digits and complete the grid. Donít forget, a move is incorrect if:
Sudoku is a fun puzzle game once you get the hang of it. At the same time, learning to play Sudoku can be a bit intimidating for beginners.


Welcome to YTD2 - Music Downloader App.
This is a a music downloading application which can download any music if it is available on the internet with its correct ID3 tags.
Changelog
Ver 1.12
Authors and Contributors
Support or Contact
Having trouble with YTD2 ? Use the in-app complaint from the menu.


Kindle is a brand name from Amazon. It can represent either:
.mobi
or .kf8
for their respective format.The rest of this section describes how one would make an Kindle ebook.
The file format of a Kindle ebook is proprietary to Amazon.
Hence, there is no easy way to generate one from scratch.
Amazon does provide tools for authors to convert works in other document formats such as HTML and XHTML or ebook formats (such as EPUB
, FB2
or XMDF
) into their .mobi
format.
The .mobi
format files was developed by Mobipocket SA for the MobiPocket Reader. The company was bought over by Amazon which adopted the format for their ebook reading devices.
The .kf8
format is an enhanced version the .mobi
format. It was intended to replace .mobi
. It is backwards compatibility with most older generation of Amazon Kindle readers except for 1st & 2nd Generation Kindle devices and Kindle DX.
There are 2 conversion tools provided by Amazon to convert existing content into Kindle format.
Kindle Create
(https://kdp.amazon.com/en_US/help/topic/G200735480)
This application takes in a .docx
or .pdf
file and convert it to Kindle format. Although this tool provides a user-interface, I do not find it to be user-friendly tool. I find myself spending a lot of time tweaking the file and then converting it and then to preview it.
KindleGen
(https://www.amazon.com/gp/feature.html?ie=UTF8&docId1000765211)
This is a command-line tool takes in HTML document or existing ebooks in other formats (EPUB) and convert them to Kindle format. The rest of the
If you are using KindleGen, another useful tool would be Kindle Previewer (https://www.amazon.com/gp/feature.html?ie=UTF8&docId=1000765261).
This tool allows you to preview the .mobi
file that was generated.
Unfortunately, this tool is only available on Windows and MacOS.
If you are using Kindle Create, you do not need Kindle Previewer (its packaged within the app).


todo
- [ ] intro
- [ ] rewrite my definition of aesthetics to include more the aesthetics of everyday life?
- [ ] drawing from mckenzie, rewrite his part to include the fact that he puts a lot of lines of code in his book, but that it’s still a mostly social/anthropological interpretation of said code
- [ ] specify that the term software engineering appeared in 1968 at a conference [[wirth_history_software_engineering]]. but actually it’s fuzzy, some people say it was around 1967 src
- [ ] ideals
- [ ] re read hacker examples part to check for spoilers
- [ ] add code examples for software industry (linux, kirby, parts of firefox, prometheus)
look into the pdf “program text, style, laber” by brian lennon to address comments in microsoft windows source code


{% extends layout_template if layout_template is defined else 'wf_page.html' %} {% block wiki_content %}
In this assignment, you will learn about reliability (the consistency of scores from a given assessment) and assessment bias (whether an assessment is biased against individuals or groups) by applying those concepts to the assessments you already created.
With this unit, we begin the second part of the course. In contrast to the relatively concrete guidelines for creating assessments, you are now going to start dealing with more abstract principles. You will see in this unit that there are no clear right or wrong answers. If you still can't come up with anything to say after reading your classmates entries, then you are free to indicate that in your entries. These are difficult questions, and some of you will struggle more than others. But you will return to these issues throughout the semester. You will also begin searching for relevant outside resources that consider these ideas in your context, role, and domain.
This unit is based on Chapters 3 and 5 in the textbook. For further information on bias, it might be helpful to watch this video from the author of our textbook, Popham.
Review Chapter 3 and Chapter 5. Then summarize your assessment practice (the suite of assessments you have developed so far) and your institutional role as they relate to reliability and bias. Highlight the aspects of your lesson and role that are particularly relevant to these issues. You should probably revisit and rewrite after you have completed the rest of the assignment. For example, many low-stakes classroom assessments do not need to be particularly reliable, but high-stakes tests used to make important decisions need to yield consistent scores; assessment bias is probably more likely in a social studies class than a chemistry class.
Go back to your previous wikifolios and examine the assessments you created for issues of reliability. Select which type of reliability evidence (stability, alternate form, or internal consistency) seems most relevant for each of the assessments you previously created. Then state what you might do to increase the reliability of YOUR assessments. This must be specific. Evaluate your assessments carefully in light of the ideas in the chapter.
Use your assessment practice as a context to explain what the SEM is and why it is such an important concept in educational measurement. Try to come up with an example of some sort of question or problem you might be able to resolve by having a better understanding of SEM.
For each of the assessment formats listed below, select which approach to reducing bias seems most appropriate. For each assessment format, write a short paragraph that discusses which type of bias (offensiveness versus unfair penalization) seems like the biggest risk, and why you chose the approach for reducing bias. Then state what you could to do decrease bias in your own items. Popham discusses bias in this article. You should be specific here and if you can't think of a way to decrease bias, you need to say so.
Review the chapter, assignment, and your peers’ wikifolios. Also, read the Chapter Summary and What Teachers Need to Know. Come up with three big ideas about reliability and bias. Number the ideas (1, 2, 3) and list them in order of importance to you, keeping in mind your role and context. Write a brief summary/explanation of each idea where you make it clear why they are relevant to you. These are the BIG ideas of the chapters not the more specific concepts listed above. You should refer to the What Teachers Need to Know…. section and the summary at the end of the chapter. Try to insert your experience and academic domain into this discussion.
Reliability and (particularly) bias are very broad topics that we can’t possibly cover in a chapter. In particular, one textbook can’t possibly address these complex issues from the perspective of your various roles, domains, and items. Use Google to locate videos, articles or other relevant resources on reliability and bias, or use Google Scholar to locate relevant scholarly papers. Experiment with different search terms.
Copy and paste the URL (Uniform Resource Locator, from the browser location bar) into your wikifolio by clicking on the link button above the edit window (middle icon in top row) and pasting the URL into the window. Write a few sentences about your resources and how it is helpful.
Take a look at the resources your classmates have posted!
Take the self-check at the end of the chapter. Answer all four questions without looking up the answers. If you can't answer the items you should go back over that section. Say a few words about the ones you got wrong and why.
Ponder the Pondertime questions. Do so in light of your role and aspirations and identify the question that is most relevant to you. Write a response to the most relevant question that includes an explanation of why it is most relevant to you. In particular consider how your role and domain impacted the relevance of the questions for you.
Post three brief reflections. You should write a coherent reflection that demonstrates understanding of the concepts and how they related to your curricular aims and context. On your Wikifolio, be sure to label each of the three types of engagement as you present your reflection.
A. Consequential Engagement. What might you do differently after reading about this week’s topic and completing this assignment?
B. Critical Engagement. How well-suited was your role and curricular aim to learning this week’s concepts and big ideas? Did one of your classmates have a better context for learning some of these concepts? Note that you are NOT being asked to critique how well you did. Rather you are reflecting on the fit between your aim and role and the concepts we learned this week.
C. Collaborative Engagement. Whose comments and examples were particularly helpful for your completing this assignment? Be specific and name people and what they contributed that was helpful.
You are advised to begin drafting the reflections while you are working on the Wikifolio, and then to complete them before starting the next assignment. They should serve as a review and help you better connect the ideas of the chapter to your practice.
While you are commenting, you should endorse at least three of your classmates’ Wikifolios for being complete. If your classmate has completed the required Context and Concepts elements of the assignment, click the box that says Required Elements Completed. If your classmate has completed all of the expertise elements (except for the reflection) click All Elements Completed.
Your own Wikifolios needs to be endorsed by at least one classmate to count towards course completion. If you completed your wikifolio and it was not endorsed by a classmate, email<EMAIL_ADDRESS>As part of reviewing and discussing, promote one (and only one) of your classmates’ Wikifolios as being exemplary from your perspective. Your reference group is whatever set you choose to review. Ideally you should promote the one wikifolio that is exemplary out of your networking group. Click the box that indicates you wish to mark it as exemplary and indicate what was exemplary about it that helped you understand the chapter concepts.
This does not have to mean it was that best or even most complete. But rather it was an exemplary consideration of the chapter concepts in a way that helped you better understand them. A “leader” badge will be issued for each of the the three sections for the member of each networking group whose Wikifolio gets the most promotions.
Post at least one question as a comment to your classmates and the instructor that this assignment raised for you, given your role and setting. Try to not ask “known answer” yes/no questions. Rather ask questions that can get some discussion started.
Review the wikifolios of your groupmates and find ones that look interesting to you. Engage in discussion with them by posting questions or responding to their questions. Be sure to put responses in the box for responses. If there are multiple responses make it clear which response you are responding to. The goal here is to generate discussion threads that consider how the chapter concepts and considerations take on different meanings for different students.


EICMA 2019: Benelli Leoncino 800 showcased along with 800 Trail
by Aditya ChatterjeeThe EICMA 2019 show has been witnessing an interesting line-up by various motorcycle manufacturers from all over the world. Among the ones that have established their presence is Benelli. The company has showcased the Leoncino 800 along with its Trail sibling. The overall styling is similar to the Leoncino 500 where retro is the main theme behind the design. But then there's more to it. Here are the details of the all-new Benelli Leoncino 800 and 800 Trail.
The Leoncino 800 is based on the twin-cylinder in-line 754cc engine capable of 81.6PS, which results perfectly integrated into the steel trellis frame. The torque rating of this motor is believed to be 67Nm mated to a 6-speed gearbox. This mechanical element features 50mm Marzocchi forks along with Brembo radial calipers. The front shocks come with compression and preload adjust ability while the rear only gets preload adjustment. The Leoncino 800 makes use of a 320mm dual disc front and 260mm rear disc brakes. The Benelli Leoncino 800 comes with 17-inch wheels and lower positioned exhaust. The Trail version recalls immediately the Scrambler models and is characterised by a 19-inch front wheel, high exhaust and suspension system featuring an increased travel. The features list includes LED headlight and TFT instrumentation.
We believe Benelli will bring both, Leoncino 800 and its Trail sibling to India at some point in time next year. It will rival the Scrambler offerings from Triumph and Ducati in the country.


ALKA SELTZER- aspirin, anhydrous citric acid and sodium bicarbonate tablet, effervescent
Salimex, S.A.
Disclaimer: Most OTC drugs are not reviewed and approved by FDA, however they may be marketed if they comply with applicable regulations and policies. FDA has not evaluated whether this product complies.
Active Ingredients
(in each tablet)
Aspirin 325 mg
Citric acid 1000 mg
Sodium Bicarbonate (heat treated) 1916 mg
Purpose
Analgesic, Antacid
Keep out of reach of children
In case of overdose, get medical help or contact a Poison Control Center right away.
Uses for the relief of:
- heartburn, acid indigestion, and sour stomach when accompanied with headache or body aches and pains
- upset stomach with headache from overindulgence in food or drink
- headache, body aches, and pain alone
Warnings
Reye's syndrome: Children and teenagers should not use this medicine for chicken pox or flu symptoms before a doctor is consulted about Reye's syndrome, a rare but serious illness reported to be associated with aspirin.
Allergy alert: Aspirin may cause a severe allergic reaction which may include:
Alcohol warning: If you consume 3 or more alcoholic drinks every day, ask your doctor whether you should take aspirin or other pain relievers/fever reducers. Aspirin may cause stomach bleeding.
Directions
- fully dissolve 2 tablets in 4 ounces of water before taking
- adults and children 12 years and over: 2 tablets every 4 hours, or as directed by a doctor do not exceed 8 tablets in 24 hours
- adults 60 years and over 2 tablets every 4 hours, or as directed by a doctor do not exceed 4 tablets in 24 hours
- children under 12 years consult a doctor
Other information
- each tablet contains: sodium 567 mg
- store at room temperature. Avoid excessive heat.
- Alka-Seltzer in water contains principally the antacid sodium citrate and the analgesic sodium acetylsalicylate
Inactive ingredients
None
Questions or comments?
1-800-986-0369 (Mon – Fri 9AM – 5PM EST)
or www.alkaseltzer.com
Salimex, S.A.


Replace all occurrences of "Microsoft" with "W3Schools" in the paragraph below:
Please visit Microsoft and Microsoft!


COLOR THEME GENERATOR FOR CUSTOM MARKDOWN BLOG SITES Create theme for your personal blog or use existing ones!


Complexity of neural networks
Posted: 2016-07-25 , Modified: 2016-07-25
Tags: neural net
Posted: 2016-07-25 , Modified: 2016-07-25
Tags: neural net
Papers:
A layer now looks like \[ h(x) = MEX_\xi [u_l^T \phi(x,z_l) + b_l]_{l=1,\ldots, n} \] where MEX is the exponential mean \[ \rc{\xi} \ln\pa{\rc n \sumo in \exp(\xi c_i)} \] and \(\phi\) is a kernel function, like \((x_iz_i)_i\) or \((-|x_i-z_i|^p)_i\). These give rise to linear and generalized Gaussian kernels when composed with MEX.
MEX interpolates between minimum, average, and maximum pooling.
There’s a natural unsupervised initialization scheme for SimNets based on statistical estimation. Assume the data is drawn from a mixture of generalized Gaussians and find max-likelihood parameters.
(cf. initialize the convolution kernels by looking at statistical properties of patches)
ICML16.
First, we show that convolutional rectifier networks are universal with max pooling but not with average pooling. Second, and more importantly, we show that depth efficiency is weaker with convolutional rectifier networks than it is with convolutional arithmetic circuits. This leads us to believe that developing effective methods for training convolutional arithmetic circuits, thereby fulfilling their expressive potential, may give rise to a deep learning architecture that is provably superior to convolutional rectifier networks but has so far been overlooked by practitioners.
Generalized tensor decompositions
\[(A\ot_gB)_{d_1,\ldots, d_{P+Q}} = g(A_{d_1,\ldots, d_P}, B_{d_{P+1},\ldots, d_{P+Q}}). \]
For arbitrary commutative/associative pooling function, replace \(\ot\) with \(\ot_g\).
COLT2016.
Consider a neural network defined on input \((x_1,\ldots, x_N)\in (\R^s)^N\), as follows.
\[\begin{align} rep(i,d) &= f_{\te_d}(x_i)\\ conv(i,z) &= \an{a^{z,i}, rep(i,:)} = \sum_d a_d^{z,i} f_{\te_d}(x_i)\\ pool(z) &= \prod_{i=1}^N conv(i,z) = \prod_{i=1}^N \sum_d a_d^{z,i} f_{\te_d}(x_i)\\ out(y) &= \an{a_y, pool(:)} = \sum_{z=1}^Z a_{y,z} \prod_{i=1}^N\sum_d a_d^{z,i} f_{\te_d}(x_i) \end{align}\]Note pool(z) is a 1-D tensor \[ (a_d^{z,i\ot N *})_{i_1,\ldots, i_N, d} \ot (f_{\te_d}(x_i))^{i\ot N}_{d,i_1,\ldots, i_N} \] so this is a rank \(Z\) tensor.
Think of conv as \(1\times 1\) convolution. Weight sharing makes the tensor decomposition symmetric.
Deep nets:
(Warning: The indexing of \(a\) has been switched around here.
We have a hierarchical decomposition. Ex. first layer:
\[\begin{align} conv_1(j,\ga) &= \an{a^{1,j,\ga}, pool_0(j,:)}\\ &=\an{a^{1,j,\ga}, \pa{\prod_{j'\in \{2j-1,2j\}} conv_0(j',k)}_k}\\ &=\an{a^{1,j,\ga}, (\conv_0(2j-1,k)\conv_0(2j,k))_k}\\ &=\sum_k a^{1,j,k} \conv_0(2j-1, k) \conv_0(2j,k). \end{align}\]Iterating this gives the hierarchical Tucker decomposition
Theorem 1: Consider the space of hierarchical tensors of order \(N\) and dimension \(M\) in each mode, parametrized by \(\{a^{l,j,\ga\}\). In this space, the tensor has CP-rank \(\ge r^{\fc N2}\) a.e.
Proof: Because the space of tensors with CP-rank forms an algebraic variety, it suffices to show that there exists a tensor of this rank. Do this by induction on layers and work with the matricization of the tensors (\(\ot\) corresponds to Kronecker product). The CP-rank equals the rank of the matricization.
Question: what about convolution with larger windows?
What is the motivation behind pooling? How much does it actually help?
Do you want universality?
Arithmetic circuits look much more like complexity-theoretic circuits! Training is harder. Product is AND, like soft version of min on \(\{0,1\}^n\)?
(Replacing sigmoids/relus by 0-1?)


Before you connect to anybody you need to set your chat name. Everybody
you
connect to will see this name when you talk. The command is:
/chatname {chat name}.
To start a chat with another person you use the call command and
their network
address. Call will accept both IP address and named address. You
can see your
IP address in MM in two ways. First, you can type /info. Second,
you can use
the procedure @IP(). Example: tell arithon My address is @IP().
Once you know
another user's ip address use call to connect to them. /call <IP_ADDRESS>
Sometimes MM will be unable to reach an IP address when you /call.
This is
usually because the person you are trying to call has a firewall.
A firewall
prevents remote systems from connecting to an internal network.
If you cannot
connect to somebody have them try to call you instead. If you still
cannot
connect to each other you may both be firewalled. You can still
chat if you
can both connect to another person who is willing to be a chat server
for you.
An easy way to get connected with a group of people already chatting
is to use
/requestconnects {name/number}. Once you connect to a user, you
can request
all of their chat connections with this command. MM will then try
to connect
you with all of the other user's connections. Only public connections
are
returned when somebody requests your connections. If you don't want
people to
see some of your connections, flag them as private.
There are several things that can happen when a chat call comes in.
You can
prevent people from connecting to you by using the DND (Do Not Disturb)
command. When a call comes in DND is checked, if it is on, the chat
connection
is hung up on without interrupting you. /dnd will toggle the option
on and
off. You can see the DND status by using /info. Autoaccept also
affects how
incoming calls are handled. If you have autoaccept off you will
be prompted to
accept the call when it comes in -- this will pause your mudding
until you
press Y or N. If you leave autoaccept on chat calls get accepted
without
prompting you. You can see the status of autoaccept with /info.
/Chat will show you all the chat connections you have. It also shows
you some
status flags associated with the different connections. The flags
and a
description of them are listed below. If you are transferring a
file thru a
chat connection, the chat name color will change. If the name is
blue, you are
receiving a file, if it is green, you are sending a file.
A - You are allowing that chat connection to transfer
commands to you
(aliases, actions, variables,
etc...). /chatcommands {name/number} will
toggle this flag.
F - Means that chat connection is behind a firewall.
I - You are ignoring that chat connection. You will
not see any chats or
name changes from that person.
/chatignore {name/number} will toggle
this flag.
P - Private connection. Connections marked as private
are not given out
when somebody requests your
chat connections. /chatprivate
{name/number} will toggle this
flag.
 When serving,
/chatalls coming from
people not being served are
sent to those you are serving -- text from
those being served is sent
to all of your other connections.
/chatserver {name/number} will
toggle this flag.
T - Allow transfers. You are allowing file transfers
from this connection.
/chattransfers {name/number}
will toggle this flag.
To talk with a specific connection you use /chat. /chat {chat name/chat
number}
{text}. Like with the other lists you can use either the name of
the
connection, or the number you see when you list your connections
with /chat. To
talk with all of your connections at the same time use /chatall
{text}.
You can also group chat connections and talk just to that group.
Use
/chatgroupset {name/number} {group name} and /chatgroupremove {name/number}
to
set and remove group names from a chat connection. Once you have
people grouped
you talk to the group with /chatgroup {group name} {text}. You can
also use /cg
as a shortcut for /chatgroup.
Emoting on the chat channel works very similar to the commands used
for
chatting. /emote, /emoteall, and /emotegroup. When you emote you
chat name and
the text you emote is sent to the chat connection. /emoteall licks
you would
send "{Chat Name} licks you." to all your connections.
To hang up on a chat connection use /unchat {name/number}.
If you want to send commands to another chat connection you have
to first get
them to enable the reception of commands from you with /chatcommands.
Once they
have flagged you able to send commands you can use the following
to send them:
/sendaction, /sendalias, /sendarray, /sendbaritem, /sendevent, /sendgag,
/sendhighlight, /sendlist, /sendmacro and /sendvariable. If you
want to send a
group of commands use /sendgroup. When you send a list or array,
all the items
belonging to the list or array are transfered as well.
To send files through a chat connection you have to get the chat
the other
party to flag with allow transfers. Use /sendfile to transfer files.
Both
users are notified when a file transfer has been started and notified
again
when the transfer is complete. You can check the status of a file
transfer with
/filestatus {name/number}. The {name/number} refers to the chat
connection, not
the name of the file being transferred. /Filecancel {name/number}
will cancel a
file transfer in progress.
/ChatBack and /ChatFore can be used to change the default colors
of the chat
text.
/ChatVersions will show you the version of MM that each of the chat
connections
is using.
By default when you start up MM it will listen for chat calls on
port 4050. You
can tell MM to listen to an alternate port if you want. You can
only change the
listen port when you first run MM, using a command line parameter.
"mudmast L:port num" will cause MM to listen to a specific port.
"mudmast L:4000" will cause MM to listen to port 4000. You can see
what port MM
is listening to with /info. /call uses port 4050 by default as well.
If you
change the port that MM is listening to you will have to let people
know which
port number to call.
Click here to return to previous page.


| Active ingredients (in each caplet) |
Purposes |
|
| Diphenhydramine hydrochloride 25 mg |
Nighttime sleep-aid |
| Naproxen sodium 220 mg (naproxen 200 mg) (NSAID)*
|
Pain reliever |
Uses
- for relief of occasional sleeplessness when associated with minor aches and pains
- helps you fall asleep and stay asleep
Warnings
Allergy alert
Naproxen sodium may cause a severe allergic reaction, especially in people allergic to aspirin. Symptoms may include:
- hives
- facial swelling
- asthma (wheezing)
- shock
- skin reddening
- rash
- blisters
If an allergic reaction occurs, stop use and seek medical help right away.
Stomach bleeding warning
This product contains an NSAID, which may cause severe stomach bleeding. The chance is higher if you:
- are age 60 or older
- have had stomach ulcers or bleeding problems
- take a blood thinning (anticoagulant) or steroid drug
- take other drugs containing prescription or nonprescription NSAIDs (aspirin, ibuprofen, naproxen, or others)
- have 3 or more alcoholic drinks every day while using this product
- take more or for a longer time than directed
Do not use
- if you have ever had an allergic reaction to any other pain reliever/fever reducer
- unless you have time for a full night's sleep
- in children under 12 years of age
- right before or after heart surgery
- with any other product containing diphenhydramine, even one used on skin
- if you have sleeplessness without pain
Ask a doctor before use if
- stomach bleeding warning applies to you
- you have problems or serious side effects from taking pain relievers or fever reducers
- you have a history of stomach problems, such as heartburn
- you have high blood pressure, heart disease, liver cirrhosis, kidney disease, or asthma
- you are taking a diuretic
- you have a breathing problem such as emphysema or chronic bronchitis
- you have glaucoma
- you have trouble urinating due to an enlarged prostate gland
Ask a doctor or pharmacist before use if you are
- taking sedatives or tranquilizers, or any other sleep-aid
- under a doctor's care for any serious condition
- taking any other antihistamines
- taking any other drug
When using this product
- drowsiness will occur
- avoid alcoholic drinks
- do not drive a motor vehicle or operate machinery
- take with food or milk if stomach upset occurs
- the risk of heart attack or stroke may increase if you use more than directed or for longer than directed
Stop use and ask a doctor if
- you experience any of the following signs of stomach bleeding:
- feel faint
- vomit blood
- have bloody or black stools
- have stomach pain that does not get better
- pain gets worse or lasts more than 10 days
- sleeplessness persists continuously for more than 2 weeks. Insomnia may be a symptom of a serious underlying medical illness.
- redness or swelling is present in the painful area
- any new symptoms appear
- you have difficulty swallowing
- it feels like the pill is stuck in your throat
If pregnant or breast-feeding, ask a health professional before use. It is especially important not to use naproxen sodium during the last 3 months of pregnancy unless definitely directed to do so by a doctor because it may cause problems in the unborn child or complications during delivery.
Keep out of reach of children. In case of overdose, get medical help or contact a Poison Control Center right away.
Directions
- do not take more than directed
- drink a full glass of water with each dose
- adults and children 12 years and over: take 2 caplets at bedtime
- do not take more than 2 caplets in 24 hours
- if taken with food, this product may take longer to work
Other information
- read all warnings and directions before use. Keep outer carton.
-
each caplet contains: sodium 20 mg
- store at 20-25°C (68-77°F)
- avoid high humidity and excessive heat above 40°C (104°F)
Inactive ingredients
carnauba wax, FD&C blue #2 aluminum lake, hypromellose, magnesium stearate, microcrystalline cellulose, polyethylene glycol, povidone, purified water, talc, titanium dioxide
Questions or comments?
1-800-395-0689 (Mon – Fri 9AM – 5PM EST)
PRINCIPAL DISPLAY PANEL - 20 Tablet Bottle Carton
NEW
PRODUCT
ALEVE® pm
naproxen sodium, 220 mg (NSAID)/
diphenhydramine HCl, 25 mg
Pain reliever/nighttime sleep-aid
SLEEP AID PLUS
12 HOUR PAIN RELIEVING
STRENGTH OF ALEVE
20 CAPLETS*
*CAPSULE-SHAPED TABLETS


Please do!
• If you know of any resources that aren't here, please read the contribution guide, open a PR and add them.
• If you have any questions or want a feature, please open an issue.
• If you know a friend or two in another cities, please encourage them to contribute to their respective cities.
Thank you!


Methods
create(file) → {object}
Creates an audio object from a file path using the set directory + this filename + the set extension.
Parameters:
| Name | Type | Description |
|---|---|---|
file |
string | the relative filepath to the file from the set directory without extension. |
Returns:
a soundObject item of the loaded sound.
- Type
- object
destroy()
Internal function to destroy a file.
doneLoading()
Internal function to be called when something's done loading.
enqueue(file)
Enqueue a file to be preloaded.
Parameters:
| Name | Type | Description |
|---|---|---|
file |
string | the relative to the path without the base directory and extension. |
findSound()
Internal function to find the sound file in memory based on a filename.
findSoundIndex()
Internal function to find a sound file based on it's index in the sounds array.
handleQueue()
Internal function to advance the queue if a file has finished loading.
isLoading()
Internal function to find out which sounds are still loading.
kill()
Whatever this does... I think it unloads everything. This lib needs a complete overhaul... Too many people had their fingers in here.
loadQueue()
Starts loading the enqueued files.
playOnce(file)
Plays a sound once, then destroys it.
Parameters:
| Name | Type | Description |
|---|---|---|
file |
string | the relative path to the file without base directory and extension. |
resetQueue()
Resets the loading queue.
resetQueuedInstance()
Unloads all sounds preloaded in the queue and resets all callbacks.
setCallback()
Internal function to set the callback when a file has finished loading.
setQueueCallback(callback)
Set the callback that gets called upon completion of queue loading.
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
function | the callback to be called. |
setStatusCallback(callback)
Set the callback function on status changes, mainly for loading queue.
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
function | Function to be called expecting one parameter containing the percentage. |


| GEOS SDK TechDocs
|
| 5.4 Input
| 5.6 Scrolling Views
Among the generic objects of the GEOS UI library is GenInteraction. This object can be used to implement menus, dialog boxes, and error boxes, and it can also be used for grouping and arranging other generic objects (such as triggers, lists, etc.). It provides extreme flexibility and functionality, and experienced programmers can usually get a menu and dialog structure up on the screen quickly just by setting a few attributes.
Remember that because the Interaction is a generic object, the Generic UI and Specific UI libraries will translate it into its proper implementation at run-time. The Interaction serves the primary purpose of grouping objects; the grouping may be implemented in various ways (e.g. a menu or a dialog box) depending on the attributes and hints applied.
The sections below outline some of the practical functionality of these objects; for a full description of what these do and how they can be used, see the Object Reference Book.
Menus
Menus in GEOS are subject to the rules and conventions of the specific UI in use by the user. However, several basic concepts are supported.
-
Standard menus
Some specific UIs have differing menu structures. Therefore, several standard generic menus (e.g. the File menu) can be implemented by giving the menu a standard set of attributes. The UI will automatically build and manage this menu according to the UI specification in use at the time.
-
Cascading or nested menus
Because Interactions may be nested, cascading (or nested) menus are easy to implement. Cascading menus are useful if an application has many menu items that may logically be grouped into different areas of functionality.
-
Keyboard accelerators
Because the UI manages both input and menus, you can easily specify accelerator keystrokes for each menu item. When the user hits the proper keystrokes, the same action is performed as if the user had clicked on the associated menu item. This happens automatically without additional application code.
-
Keyboard menu navigation
Every menu item may have a character that the user may press during keyboard navigation. This is important because it allows users to use your entire application without having a mouse.
-
Lists and checkboxes within menus
Menus may contain not only triggers but also lists of items. Lists are implemented with the GenItemGroup, GenItem, GenBooleanGroup, and GenBoolean generic objects. Lists may be exclusive or not, and each entry may have a checkbox indicating its on/off status. Again, all these functions are determined by the attributes set for the interaction and item objects.
-
Menu items that bring up dialog boxes
By setting certain attributes in an interaction, you can create menu items that automatically bring up dialog boxes. The UI will put a trigger in the menu representing the dialog box, and when the trigger is activated, the UI will put up the box.
-
Pin-up menus
In the OSF/Motif implementation of GEOS, all menus are automatically given the ability to be pinned in place and moved around the screen. Because this is a function of the specific UI, applications are completely unaware of the fact.
Dialog Boxes
Dialog boxes are standard ways of having an application interact with the user. For example, a dialog box may contain a number of controls that determine how the application displays its data.
Dialog boxes, like menus, are implemented through the use of GenInteraction objects. Applications may also call a kernel routine that will put up standard dialogs in certain situations (e.g. errors or warnings).
Several features of dialog boxes are implemented automatically with very little additional code in the application:
-
Automatic geometry management
When a dialog box contains generic objects (e.g. triggers, lists, and text fields), all geometry is handled automatically. By using various hints, you can modify the normal organization, but sizing and placement of the generic objects and the dialog box are entirely automatic.
-
Standard response triggers and reply bars
Just as there are standard menu types, UI specifications often include rules for dialog box response triggers (e.g., the "OK" button on the left and a "Cancel" button on the right). Standard response triggers normally appear in an area of the dialog box known as the "reply bar." You can set up a reply bar with standard attributes that will automatically be implemented properly by the UI. As an alternative, you can even use pre-defined dialog box types that have their own reply bars.
-
Modality
Sometimes, dialog boxes require a user action before the application or system can continue with other tasks. Dialog boxes can have various modality states: system-modal, which does not allow the user to interact with anything but the dialog box; application-modal, which allows the user to switch to other applications but disallows interaction within the dialog's application (except for the dialog box); and non-modal, which allows the user to switch to any other part of the system.
-
Standard dialog types
To increase the amount of standardization across all applications, GEOS includes several standard dialog box types accessible through the use of UI routines. These include errors, warnings, and questions. Also, you can call up custom dialog boxes with special kernel routines.
| GEOS SDK TechDocs
|
| 5.4 Input
| 5.6 Scrolling Views