Simon blogs

Started by Simon, October 18, 2015, 06:05:44 AM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Simon

#120
Tank Chess

mobius likes when I write game rules, here's a game from my teenage. I invented this with a friend when I was 13 or 14 years old, and we played it between classes in school.

American readers: In German schools, you don't walk to teachers' classes; instead, your class always consists of the same players students in the same room and the various teachers walk to your class. With the reduced walking overhead, you can play little games during breaks.



Setup. Each player starts with 5 pieces: 4 tanks (with wheels and turrets) and 1 square block on their home row. Piece order is not fixed: Secretly choose an order for your own pieces, reveal when both players have chosen.

Objective. Kill the opponent's pieces. Usually, the next class starts before you've killed all. :lix-winktongue:

Play. Players alternate taking turns. On your turn, you must make exactly one of these moves:

  • Move one of your tanks forward by 1 space. The target space must be empty. "Forward" is always defined as the direction away from the wheels. At the start of the game, any forward move therefore gets you closer to the opponent.
  • Rotate one of your tanks by 90 degrees. This changes where "forward" is for that tank, and where its turrets point. (The turrets cannot rotate independently; only the entire tank can turn as a unit. It's legal to rotate tanks such that "forward" means "back towards the player"; you'd need two rotations in two different turns to get this orientation from the starting position.)
  • Shoot at an opponent's piece. You can only shoot at pieces that are in range of at least one of your tanks' turrets. Orthogonally-pointing turrents all have a range of 2 spaces, diagonally-pointing turrets have a range of only 1 space. When you shoot at opponent's pieces 2 spaces away, the intermediate space must be empty. If the piece shot is a tank, it's removed from the board. If the piece shot is the opponent's block, flip the block over, it says "1 life" on the back, and remove it only when it's later shot a second time.
  • Move your block by 1 space orthogonally. The target space must be either empty or be occupied by an opponent's piece. The block doesn't have an orientation, it can always move into all four directions. If the block moves onto an opponent's piece, that piece is removed from the board.
Hindsight.
  • I believe killing all 5 pieces takes too long, maybe killing 3 or 4 should be the victory condition.
  • Giving the block 2 lifes was excellent balancing rule. The block must move through dangerous territory to even threaten an opponent's piece. And when you successfully kill a piece with the block, the block will be in a lousy position despite its excellent maneuverability.
  • The backwards-shooting tank is weak. Maybe it should be replaced with a tank that shoots diagonally backwards. Maybe it should even get all 3 turrets that point backwards and diagonally-backwards.
  • I've extended this game to 7x7 and played it with my brother. I believe 7x7 is boring because it takes a long time to reach the opponent at all. With 7 pieces, you need 2 extra pieces to fill your home row. I remember we designed a vacuum-cleaner piece that sucked pieces from its side and spit it out at the other side. That piece was a gimmick, it was weak, and I'd cut it from the design immediately today.
  • When a block moves onto the opponent's block that has 2 lives, I believe the opponent's block should be killed for simplicity. I don't remember what rules we had for this 18 years ago. Blocks moving onto blocks won't comes up in practical play because the other block can escape easily.
-- Simon

Simon

First Phobos PR

I've opened my first pull request against Phobos, the D standard library. 75 % of the change is the unittest. :lix-evil: That bug had caught me several times over the years, and the fix looked obvious to me.

I've always wanted to contribute to a large, prestigeful project, and I'm happy to present something as polished as I could make it. Now awaiting feedback, then possibly polishing the fix further.




UI design

I've noticed a pitfall when programmers present information in a user interface. Programmers instinctively focus on the abstract even when the user expects focus on the concrete. Example from a Discord bot that announces twitch streams:



Here's the slightly better way, from Lix:



The difference is that Lix emphasizes the concrete values with the strongest color, white. Insane Steve, he designed the level. 1/10, that's the goal. 4 lix saved, that's your best score.

This is reasonable. Often, you can already guess what the values mean without reading the abstract description. Any Way You Want, that's the level title even though I haven't printed "Level title:" next to that. Insane Steve, because it's a person's name, would probably be recognizable as the author even without annotation, but a short "By:" doesn't distract much. English readers habitually glance over such short words; they focus on the nouns and verbs.

By comparison, the Discord bot emphasizes the abstract categories with the strongest color, white. The stream is about a game, it happens that the game is Jazz 2. The stream has a title, by the way, the title is bla bla bla. With the white color, the bot draws your attention to the filler text -- the most uninteresting text in the entire announcement! You could even leave away "Stream title" entirely and the concrete title would keep enough information scent to keep it clear how that's the title.

-- Simon

Dullstar

By the logic presented for giving the strongest color to the concrete topics, might I suggest making the level titles also white? (It doesn't really matter that much; the contrast in the Lix example is much more subtle than the contrast in the bot example, so it's not terribly distracting)

The bot example is REALLY badly designed. The least important information stands out with so much contrast that it actually makes the darker text feel a lot darker (and therefore harder to make out) than it would be by itself.

One key factor, however, is the length of the text involved. If the text portions were large and took a bit to thoroughly read, having the headings stand out would help the reader identify which part of the text is most likely relevant to the information they're looking for. However, because this example is so short, giving the sections bright, easily noticed headings actually makes it harder, rather than easier, to find the information you're looking for.

Simon

Title should be in white instead of light blue: I agree. It's merely not white due to tradition; it was the first label in that section that I implemented and I didn't print anything in white back then. :lix-ashamed:

The title appears twice in the dialog: Once in the list of levels on the left that I didn't screenshot, and once in the info section in the screenshot. Still, it's still very important and should be white. It's more important than author and own score. Only the save requirement is possibly more important.

-- Simon

Simon

#124
I'm back at the guinea pig diet: Whenever you eat bread, e.g., with cheese or salami, always add lots of cucumber on top. Peppers on top of that are a welcome extra, but peppers aren't declared absoluely necessary by guinea pig diet experts, you're okay to omit them.

This works because you will naturally eat more cucumber and less of anything else. Preparing meals takes longer and you will not prepare excess food. In general, keep a rough total of how much you eat, and cut sugary drinks and sweet/salty snacks nearly entirely. Reserve such snacks for social gatherings.

Reasons for diet: Guinea pigs love cucumber, and I want to reach my lowest point of 78 kg again from 2016; I'm 1.92 m tall and 85 kg with many quills few muscles.

I made a bet with a friend to reach 78 kg by mid-November 2018. He's slightly taller than I am, but he's overweight at 147 kg. He wants to be at 135 kg by mid-November. That's a reasonable speed for both. The heavier you are, the easier it is to lose fat.



Gifs

Capybara qualifies as guinea pig in a pinch. (You can supply a larger object with the same characteristics for a smaller one. Liskov substitution.)



Cat doesn't qualify as guinea pig, but it fits so well with the capybara gif, here it is.


-- Simon

grams88

Is that Simon trying to tell us something maybe it might be his birthday, I think I see birthday material there behind the two guinea pigs.

My brothers getting right into the cooking and preparing meals, He's been getting into indian food. He's been trying keema the other day which he enjoyed, I'm not big myself on keema myself but I gave it a try yesterday and it was hot or spicy, I tend to get those two mixed up. He's been experimenting with different foods lately.

mobius

sounds very healthy.
Fyi: in your latest picture with Icho and Proxima you didn't look the slightest bit overweight to me. (nor in any other picture)

my cat likes being combed like that; but doesn't often stay still long enough to get the whole body. :D
everything by me: https://www.lemmingsforums.net/index.php?topic=5982.msg96035#msg96035

"Not knowing how near the truth is, we seek it far away."
-Hakuin Ekaku

"I have seen a heap of trouble in my life, and most of it has never come to pass" - Mark Twain


Simon

#127
Hah, no, I didn't have any birthdays recently. And yes, Indian food sounds nice, very spicy.

Wok

When I ever move out of this apartment, a long-term plan is to get a wok and learn to use that. Even today, most of my dishes work similar to wok dishes: Get vegetables, maybe get meat too, then cut everything to pieces. Fry everything together. Then make noodles/rice/couscous/... and serve both.

IchoTolot jokes that I say "When I ever move out of this apartment" far too often and I should finish on getting the thesis done for good. I believe I've already fixed all nasty bugs in the thesis.




The

Consider the following sentence from a logical point-of-view: The pope is male. Since first-order logic has no "the", only "for all" and "there exists", we have to agree on how to translate the sentence into first-order logic. Commonly accepted, and suggested by, e.g., Russell's On Denoting and by Frege, is:

1. There exists an X such that X is a pope. (At least one pope exists.)
2. For all X and Y, if both X and Y are popes, then X = Y. (At most one pope exists.)
3. For all X such that X is a pope, X is male.

Then, "The pope is male." is equivalent to (1 and 2 and 3).

What happens when "the" refers to a plural? Consider: The frogs are green. Which of these rewrites to first-order logic are equivalent to "The frogs are green."?

Rewrite A.
1. For all X, if X is a frog, then X is green.
(No claim of existence.)

Rewrite B.
1. For all X, if X is a frog, then X is green.
2. There exists an X such that X is a frog. (At least 1 frog exists.)

Rewrite C.
1. For all X, if X is a frog, then X is green.
2. There exist X and Y such that X is a frog, Y is a frog, and X ≠ Y. (At least 2 frogs exist.)

I have a strong preference (which I will keep secret temporarily, to not bias anybody) but I doubt there is a universally accepted rewrite. Forestidia disagrees with my choice here and has a strong background in philosophical logic. The classical examples on the internet don't help either, Russell's essay is purely about the singular "the".

-- Simon

ccexplore

I feel like there is an implied context of some sort when you say "the frogs".  That is, from some previous communication (maybe a previous sentence, maybe something you said in IRC yesterday, whatever), a specific set of frogs had been specified, and then this sentence is referring to all members of that specific set.

Without the context I'd argue the sentence is ambiguous and poorly written.  It would be better to just say "Frogs are...", or perhaps "All frogs are..." or "Some frogs are..." depending on the exact semantics desired.

Indeed, the same can be argued for singular "the".  The interpretation given by Simon only works because in our world there is exactly one pope*.  If the sentence had been something like "The man is tall", it would not be implying at most one man exists.  It would be referring to a specific man via an implied context established in past communications.

*More precisely, exactly one person being the pope at any time.

ccexplore

While we're on this topic, what are your thoughts on the difference (if any) between

A dog is a mammal.

and

Dogs are mammals.

Is the usage of singular versus plural meaningful?

Forestidia86

#130
Quote from: ccexplore on May 25, 2018, 11:05:56 AM
While we're on this topic, what are your thoughts on the difference (if any) between

A dog is a mammal.

and

Dogs are mammals.

Is the usage of singular versus plural meaningful?

My feeling says no concerning logical analysis.

I would formalize both as: For all x: if x is a dog then x is a mammal

Edit: I assumed for the first sentence that you want to make a general statement about dogs and not to say that some dog happens to be a mammal.

Dullstar

Quote from: Simon on May 24, 2018, 04:59:07 PM
Consider: The frogs are green. Which of these rewrites to first-order logic are equivalent to "The frogs are green."?

Rewrite A.
1. For all X, if X is a frog, then X is green.
(No claim of existence.)

Rewrite B.
1. For all X, if X is a frog, then X is green.
2. There exists an X such that X is a frog. (At least 1 frog exists.)

Rewrite C.
1. For all X, if X is a frog, then X is green.
2. There exist X and Y such that X is a frog, Y is a frog, and X ≠ Y. (At least 2 frogs exist.)

I have a strong preference (which I will keep secret temporarily, to not bias anybody) but I doubt there is a universally accepted rewrite. Forestidia disagrees with my choice here and has a strong background in philosophical logic. The classical examples on the internet don't help either, Russell's essay is purely about the singular "the".

-- Simon

I don't have any background in formal logic, but I will make an attempt at this, as I don't really have anything better to do right now and I find this to be an interesting thought exercise.

It seems to me that there probably can't be a universal rewrite for this sentence, because there's insufficient context to determine the exact bounds of the subset "the frogs."

"The frogs are green" can be true or false depending on what "the frogs" refers to. We need context to determine that. Suppose there is a box containing frogs. I point to it and say, "The frogs are green." This extra context removes the ambiguity as to which frogs we are referring to - now it's the frogs that are in the hypothetical box, rather than an unspecified group subset of frogs. But now we must check to see if the statement is actually correct. It is possible for all the frogs in the box to be green[1][2]. However, it is also possible that at least one of the frogs in the box is NOT green[3][4]. For this reason, I can create a set of frogs for which the statement "The frogs are green" is false.

This is where I can no longer really work with the given information without more background knowledge. I am unsure of the exact meaning of "For all X, if X is a frog, then X is green." Is this statement defining the object selection, to state that all the frogs under consideration are green (i.e. if an object is a frog, and it is not green, it is not X)? Or is it a statement that, for any given object X, if X is a frog, it is green (i.e. stating that all frogs are green)?

Based on these two interpretations, I'd say the following:

If "For all X, if X is a frog, then X is green" is equivalent to the statement "If an object is a frog, and it is not green, it is not X" then I'd say that Rewrite C is best, simply because it clarifies that there is more than one frog, which is implied in the plain language "The frogs are green." Rewrite B also allows for the possibility that there is one frog, which is NOT a possibility implied by the plain language, and Rewrite A does not specify that any frogs exist.

If "For all X, if X is a frog, then X is green" is equivalent to the statement "All frogs are green," then, due to the pictures shown in [3] and [4], then Rewrites A, B, and C are all demonstrably false.

---
Regardless of the proper formalization of "The frogs are green," if we make the assumption that the statement is true, then the following items must be accounted for to avoid anything being lost in translation:

1) "The frogs" refers to at least 2 frogs, all of which are green.
2) The statement becomes false if "the frogs" is changed to "all frogs."
3) It is not possible to fully ascertain what frogs are being referred to by "the frogs" without additional context.

Forestidia86

#132
Quote from: Dullstar on June 04, 2018, 05:41:02 AM
It seems to me that there probably can't be a universal rewrite for this sentence, because there's insufficient context to determine the exact bounds of the subset "the frogs."

"The frogs are green" can be true or false depending on what "the frogs" refers to. We need context to determine that. Suppose there is a box containing frogs. I point to it and say, "The frogs are green." This extra context removes the ambiguity as to which frogs we are referring to - now it's the frogs that are in the hypothetical box, rather than an unspecified group subset of frogs. But now we must check to see if the statement is actually correct. It is possible for all the frogs in the box to be green[1][2]. However, it is also possible that at least one of the frogs in the box is NOT green[3][4]. For this reason, I can create a set of frogs for which the statement "The frogs are green" is false.

That's a very good point. Yeah, the statement is dangling without context. So formalization is probably not complete without catching somehow the context or that there is further context.

Quote from: Dullstar on June 04, 2018, 05:41:02 AM
This is where I can no longer really work with the given information without more background knowledge. I am unsure of the exact meaning of "For all X, if X is a frog, then X is green." Is this statement defining the object selection, to state that all the frogs under consideration are green (i.e. if an object is a frog, and it is not green, it is not X)? Or is it a statement that, for any given object X, if X is a frog, it is green (i.e. stating that all frogs are green)?

I'm not fully sure if I can pinpoint what you say there.

Generally "For all X, if X is a frog, then X is green." is an universal statement and is meant to formalize "All frogs are green.". One remark: This statement is equivalent to "For all x it is not the case that x is a frog and x is not green." Another remark: "For all X, if X is a frog, then X is green." doesn't imply in modern formal logic that there are frogs.

One point is that if one talks about all objects still the question remains for truth or falsehood what is the set of objects and how are expression like "frogs" and "green" defined or what objects are assigned to them.

In formal logics you have model-theoretic semantics, where a model has a set of objects as a domain and an interpretion function that e.g. assigns subsets of the domain to the one-place predicates (like "frogs" and "green"). Depending on the model the sentence is true or false in that model unless it's a logical truth, which the given sentence is not.

But in general if you formalize a sentence of natural language one has the model that fits to our understanding of the world in the back of their minds I would say since that's the background people are formulating these sentences.

I think generally formalization mainly tries to catch the logical structure of the sentence, is on the syntactical side and most of such sentences will be logically indetermined.

Simon

#133
Thanks everybody for the exciting responses!

Quote from: ccxWithout the context I'd argue the sentence is ambiguous and poorly written.
Quote from: DullstarIt seems to me that there probably can't be a universal rewrite for this sentence, because there's insufficient context to determine the exact bounds of the subset
Quote from: ForestidiaYeah, the statement is dangling without context.

I have to agree. This problem draws more attention than what I wanted to discuss.

For my original interest, better would have been: I put a box in front of us all, point to the box, and say: The frogs in the box are green. Is this sentence then equivalent to All frogs in the box are green. or is it only equivalent once we, in addition, establish that there are at least 1 or 2 frogs in the box?

Quote1) "The frogs" refers to at least 2 frogs, all of which are green.

This answers my original question: You prefer that, as long as the set is determined, that "The frogs in that set are green." require at least 2 frogs in the set to have any chance to be true.

Forestidia prefers also at least 2 frogs if the sentence comes from natural language. If it's clear that the sentence comes from a logical discussion, 1 frog may be enough for her, but never 0 frogs.

My preference is that "The frogs in the set are green." is equivalent to "All frogs in the set are green." Still, I would ask for clarification if this arose in natural language and the set turns out to contain 0 frogs.

QuoteA dog is a mammal.
Dogs are mammals.

My feeling says no concerning logical analysis.
I would formalize both as: For all x: if x is a dog then x is a mammal

I agree that both sentences mean "For all X: If X is a dog, then X is a mammal."

In natural language, there are disguised universal statements, such as: "The dog is a mammal.", still meaning "All dogs are mammals." This feels like abuse of language but it's still okay as long as we haven't specified any single dog before.

Quote from: Forestidiaif you formalize a sentence of natural language one has the model that fits to our understanding of the world in the back of their minds

Yeah, natural language has many implicit dependencies. The model is a common understanding of the real world unless I override that explicitly. I didn't override anything in my examples to keep them simple; I even made the examples too simple/undefined.

-- Simon

ccexplore

We've certainly been conditioned to expect 2 or more frogs.  I could imagine though the case where everyone including the speaker did expect there were at least 2 frogs in the box, but then after speaking the sentence, someone open the box and somehow, the frogs weren't there anymore (maybe there's a hole somewhere in the box we all overlooked, whatever).  Everyone would be surprised, but I think you could convince at least some people that the sentence is still true.

In contrast, if the box is transparent and has been in full view of everyone for a long time and there were never any frogs seen inside, you would probably have a much harder time convincing a layman that the same sentence being uttered would be true.  It would "feel" wrong in this case and make people feel you are kind of being misleading.