This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#6826 2013-02-10 13:59:28

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

Hardmath123 wrote:

Let the guests be Alan and Alice, Bill and Beatrix, Carl and Cindy, Daniel and Della, and Ethan and Emma. Also, let Alan be the mathematician.

Aww, I was trying so hard to avoid suggesting that the mathematician has to be male!

You really were...  tongue

The mathematician's spouse is one of the nine people who gave distinct answers.  So once you pair off 0-8, 1-7, etc., then you just say "whoever's left (namely 4) must be married to the mathematician."

Having found a solution, I show it to mum, who says "I still don't understand why the mathematician's spouse has to be 4..." — which it turned out I still didn't understand either! I think I get it now, though, so thanks to both of you for explaining  wink

Good puzzle  big_smile

EDIT: Brian, do you think this could this be solved using a program, a la your thing on logic puzzles?

Last edited by blob8108 (2013-02-10 14:04:05)


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#6827 2013-02-10 15:40:22

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

blob8108 wrote:

EDIT: Brian, do you think this could this be solved using a program, a la your thing on logic puzzles?

Nice project!  Fun to play with.

I was thinking about that myself.  The thing is, once you get that the answers are [0, 8], it could probably be set up easily enough, but the leap from the problem as stated to that point is the hardest thing in the problem, so that's sort of cheating.

EDIT:  Of course, my logic program is really feeble; it handles only propositional logic, not predicate logic.  In principle, if I can solve it, a computer can solve it.

Last edited by bharvey (2013-02-10 20:01:40)


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#6828 2013-02-10 20:34:40

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

Hardmath123 wrote:

Let the guests be Alan and Alice, Bill and Beatrix, Carl and Cindy, Daniel and Della, and Ethan and Emma. Also, let Alan be the mathematician.

Aww, I was trying so hard to avoid suggesting that the mathematician has to be male!

And I guess you must live in one of the states that hasn't gotten around to legalizing gay marriage yet.  smile

Why'd you think I picked Alan?  smile

We now proceed to prove that Alice (the mathematician's wife) could not have shaken eight or zero hands. If she had shaken zero hands, then the guest who shook eight hands would obviously not be her spouse. Similarly, if she had shaken eight hands, the guest who shook no hands wouldn't be her spouse. As shown above, neither of these cases is possible, so Alice shook neither eight nor zero hands.

I don't think you have to go through all that work.  The mathematician's spouse is one of the nine people who gave distinct answers.  So once you pair off 0-8, 1-7, etc., then you just say "whoever's left (namely 4) must be married to the mathematician."

This is one of my favorite puzzles, because at first glance it seems like there can't possibly be enough information in it, but by the end of the argument you know exactly who shook hands with whom, including btw the mathematician, who (like his/her spouse) shook hands with 8, 7, 6, and 5.

It's hard to sleep with a math problem on your mind, isn't it?

Wait, you weren't supposed to be sleeping; you were supposed to be prepping for a piano lesson!  smile

Don't tell my mom.  tongue

PS  The UCB implementation of Lisp for Unix, years ago, was called Franz Lisp.

Cool—why is it that though geeks are mocked for their sense of humor, they are usually the epicest when it comes to inside jokes?


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#6829 2013-02-10 21:57:13

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

why is it that though geeks are mocked for their sense of humor, they are usually the epicest when it comes to inside jokes?

People don't mock geeks any more, not since the Facebook movie, haven't you noticed?


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#6830 2013-02-11 02:57:39

OldCodger
New Scratcher
Registered: 2012-05-16
Posts: 54

Re: BYOB 3 - Discussion Thread

bharvey wrote:

blob8108 wrote:

EDIT: Brian, do you think this could this be solved using a program, a la ...missing URL...

Nice project!  Fun to play with.

I was thinking about that myself.  The thing is, once you get that the answers are [0, 8], it could probably be set up easily enough, but the leap from the problem as stated to that point is the hardest thing in the problem, so that's sort of cheating.

EDIT:  Of course, my logic program is really feeble; it handles only propositional logic, not predicate logic.  In principle, if I can solve it, a computer can solve it.

There is a solution to this problem in MiniZinc. Go to Hakank.org and check out his constraint programming blog. A great resource if you are interested in these types of problem.

Offline

 

#6831 2013-02-11 05:51:00

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

Hardmath123 wrote:

why is it that though geeks are mocked for their sense of humor, they are usually the epicest when it comes to inside jokes?

People don't mock geeks any more, not since the Facebook movie, haven't you noticed?

That's debatable at our school.  hmm

Ok, I have a bit of a problem for you guys about my Snap converter: should I aim to keep the scripts of the project the same, or the behavior consistent? Having the exact same behavior as Scratch 2.0 will need some "hacks" which I'm not comfortable adding at this point without asking you guys. For example, Scratch 2.0 lets you clone an arbitrary sprite, not just the sprite that calls "clone" (so I can clone a pac-man from a ghost sprite). I can convert that easily by adding in a "-s8-clone-<spritename>" broadcast on each sprite that is cloned from another object (telecloning?  tongue ), but that's not very nice. Also, can you introduce at least a temporary hidden experimental version of the ([] of []) block? You can refine the functionality later, but I need the presence of that blockspec—many projects (a surprisingly large number) use this block. Again, I can hack this by adding in a global list whose values are constantly updated by respective sprites, but I'm not particularly satisfied with that.

I'm having some issues with PNG costumes, and I still need to implement custom blocks; but other than that, everything works brilliantly.  big_smile  I'll post a few more converted projects for you to stare at when I get a chance.  tongue


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#6832 2013-02-11 06:33:51

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

should I aim to keep the scripts of the project the same, or the behavior consistent?

I'd intuitively say consistent behaviour, but constructing lists seems overkill. For the broadcast hack, I'd go for it.

I'll post a few more converted projects

Try my nodes one!  big_smile

Last edited by blob8108 (2013-02-11 06:34:42)


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#6833 2013-02-11 06:36:28

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Oh yeah! Does it use any custom blocks?


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#6834 2013-02-11 10:39:19

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

Oh yeah! Does it use any custom blocks?

Several, in fact — to get atomic loops. Is that a problem?


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#6835 2013-02-11 10:45:39

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Yeah, unfortunately I still haven't implemented those. Maybe tomorrow—I've been really bus these days.  sad


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#6836 2013-02-11 10:47:54

joefarebrother
Scratcher
Registered: 2011-04-08
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

We now proceed to prove that Alice (the mathematician's wife) could not have shaken eight or zero hands. If she had shaken zero hands, then the guest who shook eight hands would obviously not be her spouse. Similarly, if she had shaken eight hands, the guest who shook no hands wouldn't be her spouse. As shown above, neither of these cases is possible, so Alice shook neither eight nor zero hands.

Wait... why not?

Last edited by joefarebrother (2013-02-11 11:37:00)


My latest project is called http://tinyurl.com/d2m8hne! It has http://tinyurl.com/d395ygk views, http://tinyurl.com/cnasmt7 love-its, and http://tinyurl.com/bwjy8xs comments.
http://tinyurl.com/756anbk   http://tinyurl.com/iplaychess

Offline

 

#6837 2013-02-11 11:34:26

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

That's debatable at our school.  hmm

Oh.  Well, just look coolly at them and say "someday you're
going to be working for me."

I have a bit of a problem for you guys about my Snap converter: should I aim to keep the scripts of the project the same, or the behavior consistent?

Behavior consistent, definitely.  It's not much of an advertisement for Snap! if we run Scratch 2.0 projects wrong!

@Jens:  Having started down this road, you now have to give Hardmath the necessary features to make it really work right.  Certainly we need OF even for Scratch 1.4 projects!  Imho.


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#6838 2013-02-11 11:43:42

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: BYOB 3 - Discussion Thread

joefarebrother wrote:

Hardmath123 wrote:

We now proceed to prove that Alice (the mathematician's wife) could not have shaken eight or zero hands. If she had shaken zero hands, then the guest who shook eight hands would obviously not be her spouse. Similarly, if she had shaken eight hands, the guest who shook no hands wouldn't be her spouse. As shown above, neither of these cases is possible, so Alice shook neither eight nor zero hands.

Wait... why not?

Does this help explain?  smile

http://i.imgur.com/W04Cdid.png

The grey one is the mathematician. If the mathematician's spouse (below the mathematician) shakes 8 hands, all the other 8 people must shake hands with her. But we know that one of them must shake no hands for them all to shake a different number (as there are nine of them).


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#6839 2013-02-11 11:53:32

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

OldCodger wrote:

There is a solution to this problem in MiniZinc. Go to Hakank.org and check out his constraint programming blog. A great resource if you are interested in these types of problem.

Could you give me a more specific URL?  I couldn't find it.  Tnx.


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#6840 2013-02-11 11:55:57

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

joefarebrother wrote:

Wait... why not?

As I said earlier, just ignore that paragraph in Hardmath's proof; once you establish that 0 and 8 are married, then that 1 and 7 are married, etc., in the end the only people left are 4 and the mathematician.


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#6841 2013-02-11 12:11:49

joefarebrother
Scratcher
Registered: 2011-04-08
Posts: 1000+

Re: BYOB 3 - Discussion Thread

OK, now i understand the math problem.


By the way, why won't this:
http://i.imgur.com/JEOx5dB.png http://i.imgur.com/iYvADLW.png

work?

Last edited by joefarebrother (2013-02-11 12:38:05)


My latest project is called http://tinyurl.com/d2m8hne! It has http://tinyurl.com/d395ygk views, http://tinyurl.com/cnasmt7 love-its, and http://tinyurl.com/bwjy8xs comments.
http://tinyurl.com/756anbk   http://tinyurl.com/iplaychess

Offline

 

#6842 2013-02-11 14:00:31

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Okay, I promise to work on the OF block (Scratch-style, not BYOB3 style). Hardmath123, just consider it to be there  smile

About the CLONE block, I really don't want the present block to take a sprite name as argument. Can you work around that one?


Jens Mönig

Offline

 

#6843 2013-02-11 15:50:09

xly
Scratcher
Registered: 2010-04-17
Posts: 100+

Re: BYOB 3 - Discussion Thread

@Jens : "About the CLONE block, I really don't want the present block to take a sprite name as argument. Can you work around that one?"
If with Snap! one can create a TELL custom block, there is no need to have a DEFINE CLONE + Object variable
With TELL you can launch from any object any action executed by any other Object.

Offline

 

#6844 2013-02-11 17:14:14

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

xly wrote:

If with Snap! one can create a TELL custom block[...]

Yes, once we add OOP in 4.1 this will all be easy.  The current discussion is about the minimal kludgery needed to run Scratch 2.0 projects in Snap! 4.0.

@Jens, How about a kludge in which you add to the left pulldown of the OF block a choice CLONE, so the block could say [CLONE OF Sprite3]?  (EDIT: And that choice would have to change the block's shape to Command.  hmm )

Yeah I know it's a kludge, I already said so.  smile

Last edited by bharvey (2013-02-11 18:38:36)


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#6845 2013-02-11 17:15:24

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

joefarebrother wrote:

By the way, why won't this [...]
work?

Ah, thanks for the example call.  I read your block and had no idea what it was trying to do.  I'll look this over tonight.

EDIT:  I'm going to need some more documentation of what you're trying to do.  Aside from the confusingness of something called list-or-procedure, in your example I got stuck right here:

http://cs.berkeley.edu/~bh/huh.png

because you're calling a one-input function with no inputs.

Sorry...  Toss me a line.   smile

Last edited by bharvey (2013-02-11 22:38:52)


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#6846 2013-02-12 01:57:24

OldCodger
New Scratcher
Registered: 2012-05-16
Posts: 54

Re: BYOB 3 - Discussion Thread

bharvey wrote:

OldCodger wrote:

There is a solution to this problem in MiniZinc. Go to Hakank.org and check out his constraint programming blog. A great resource if you are interested in these types of problem.

Could you give me a more specific URL?  I couldn't find it.  Tnx.

Sorry but I'm not yet trusted to give URL's.

Try www.Hakank.org/constraint_programming

Offline

 

#6847 2013-02-12 02:01:39

OldCodger
New Scratcher
Registered: 2012-05-16
Posts: 54

Re: BYOB 3 - Discussion Thread

OldCodger wrote:

bharvey wrote:

OldCodger wrote:

There is a solution to this problem in MiniZinc. Go to Hakank.org and check out his constraint programming blog. A great resource if you are interested in these types of problem.

Could you give me a more specific URL?  I couldn't find it.  Tnx.

Sorry but I'm not yet trusted to give URL's.

Try www.hakank.org/constraint_programming

Offline

 

#6848 2013-02-12 06:20:10

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread

OldCodger wrote:

Sorry but I'm not yet trusted to give URL's.

Make some (3, but you didn't hear it from me) projects! The system is automated, and I know the secret recipe.  smile

@bharvey and Jens: I think the ugliest yet most functional way is to have a secret broadcast called "-snap-clone-*" where you specify the sprite name in place of *. I can do that myself already—just make dummy broadcast receptors with "clone" blocks! Are you guys ok with that hack? It can be an optional parameter-option-flag-thing: -clonehack.

Interestingly, this is exactly the inverse of the problem I had with 2.0 cloning a while ago: they didn't let you clone yourself, only someone else.  tongue

OF blocks will default to (timer) until you implement it (remember to give me the blockspec!). But no pressure, I doubt I'll have any serious coding time for a while now.

Now to work on those custom blocks I've evaded for a while now…


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#6849 2013-02-12 07:10:45

xly
Scratcher
Registered: 2010-04-17
Posts: 100+

Re: BYOB 3 - Discussion Thread

Hardmath123 says "@bharvey and Jens: I think the ugliest yet most functional way is to have a secret broadcast called "-snap-clone-*" where you specify the sprite name in place of *"
I've tried to mix CREATE A TEPORARY CLONE with BROADCAST
The issue is that each new CREATE double each times the number of clones already created. Is this a solution : have an index NB to say CREATE NB CLONES

Offline

 

#6850 2013-02-12 09:18:36

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Ooh, I didn't think of that. Basically, you need to have a local variable called "original", and set it to 1. Then under a "when cloned" hat set it to 0. Finally, in the -snap-clone-*" broadcast check if "original" is equal to 1.  smile


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

Board footer