Author Topic: Simon blogs  (Read 95902 times)

0 Members and 1 Guest are viewing this topic.

Offline DireKrow

  • Noisy Crow
  • Posts: 113
    • View Profile
Re: Simon blogs
« Reply #330 on: September 25, 2022, 04:52:39 AM »
Quote
Everybody can read C source code.
Everybody knows the rules of popular classical board/card games.
Everybody is fit with high-school mathematics, in particular, high-school level calculus.
Everybody knows some mathematics beyond the high-school level, whether from formal education or by self-teaching. Hard to define how far I assume this; let's say, complex numbers, some graph theory, linear algebra, elementary set theory, elementary topology.

These ones aren't true for me, and not for most people I see in at least some of the communities I frequent. It does feel like it's true for most people I hang out with in the puzzler community, though.
LOTY 2020 Winner
My NeoLemmix Levels: The Krow Files (File A v1.2 released 21-Feb-2020)

Online Simon

  • Administrator
  • Posts: 3387
    • View Profile
    • Lix
Re: Simon blogs
« Reply #331 on: October 08, 2022, 04:15:27 PM »
Hmm.

I think with your background and involvement in puzzle culture, you can make up for any of those ad hoc. Or even routinely shove some missing groundwork on the backburner, understand a topic sufficiently well without, and come back to specific parts of the groundwork later if they really prove necessary.



x − 6 − 2 is not x − 4, it's x − 8. Cost me an hour of second-guessing batter physics today. :lix-scared:

The whole computation should really be written as x + −6 + −2, then you can reorder without making sign errors. Then, − will appear only ever as a unary operator, never as an infix, and we can have − bind stronger than all of addition, multiplication, and even raising to powers. We can write −1n for the popular (−1)n. :lix-evil:

-- Simon
« Last Edit: October 08, 2022, 06:35:52 PM by Simon »

Online Simon

  • Administrator
  • Posts: 3387
    • View Profile
    • Lix
Re: Simon blogs
« Reply #332 on: October 09, 2022, 10:05:37 PM »
Game design problem.

Hardware: 1 opaque bag, and 5 marbles each in n ≥ 2 different colors.

We want to generate an infinite sequence of the n colors by drawing marbles from the bag, e.g., one by one, recording each drawn color.

Task: Design the protocol for inserting and reinserting marbles in the bag. It's up to you how many marbles to put in initially. It's up to you what to do with drawn marbles: You might put them back immediately, you might set them aside until some condition is met before you put them in, etc. You don't even have to use all the hardware available; maybe you need only 1 or 2 of each color.

Restrictions:
  • Marbles can only ever be in the bag or be set aside. No physical mangling, no half marbles, no markings.
  • You must never be able to know in advance what color you will draw the next time.
  • It's okay if some colors are temporarily impossible to draw.
  • After drawing a color, the probability of drawing it immediately again should be lower than the probability of this drawing was.
  • When a color hasn't been drawn for a while, its probability should increase. (I'd love to give a hard requirement here, e.g.: For n < 10, if color X hasn't been drawn in the previous 10n drawings, it should have > 50 % probability to appear next. But if your cool algorithm falls short just by a few percent, I'd rather see your cool algorithm than insist on these exact figures.)
  • Adhere to the law of large numbers: If we cut the sequence after the first 1,000 drawings, we should expect to see each color with relative frequencies around 1/n. If we cut after the first 100,000 drawings, we should expect even more to see relative frequencies around 1/n.
Design goals that can't be hard restrictions:
  • The protocol should be simple enough for 8-year-old kids to follow. Not a hard requirement because it's in the eye of the beholder.
  • The protocol should be reasonably fast to follow. Counting set-aside marbles is okay. Looking stuff up in arcane wargaming tables is too hard.
  • Your protocol can demand the players to dump all marbles from the bag, so you can re-seed the bag with exactly what you want, but that's not elegant. Ideally, the only time marbles ever leave the bag is the drawing for the sequence.
  • Your protocol can draw multiple marbles per drawing and then convert the drawn tuple to a single color by applying some function. Not the most elegant way, but I'll certainly allow it.
  • The protocol can form a queue of set-aside marbles, but again that's not so elegant. The marbles might roll around and disturb the order. Ideally, your collection of set-aside marbles remains a multiset -- we only care about the number of each color in the collection.
In effect, I want to have a biased drawing that implements gambler's fallacy ("It's due!") but still is nontrivially random on every single drawing.



One idea is: Put 1 of each color into the bag, we won't use the remaining 4 at all.
Repeat forever: {
    Draw without reinserting.
    After drawing the current marble, if now only 1 marble is left in the bag: {
        Put the earlier drawn marbles (that we previously set aside) back in the bag.
        Set aside the current marble (it's now the only one set aside).
    }
}

Downsides:
  • Purely by feeling: The most recent color is disadvantaged twice in the early game: We drew it pretty late for its first time, and now we even set it aside for longer than anything else.
  • The protocol falls short of the > 50 % goal. Colors only ever have 50 %.
  • For n = 2, it produces the alternating sequence, and thus allows certain knowledge about the next color after the first drawing.


Edit: Changed 90 % to > 50 % in that awkward goal.
Edit: More on elegance, I distinguish between dumping all and merely drawing multiples.

-- Simon
« Last Edit: October 10, 2022, 05:28:33 AM by Simon »

Online Simon

  • Administrator
  • Posts: 3387
    • View Profile
    • Lix
Re: Simon blogs
« Reply #333 on: October 12, 2022, 06:35:44 PM »
Why not Twice

DOS Lemmings 1 had skill assignments.

Lix, NeoLemmix, Lemmini, ..., have replays: A replay is a recipe that tells the computer when the computer should assign skills. In particular, in Lix, we never assign directly into physics; instead, the click edits the replay, and then the nurse (yes, I really called it that :lix-trouble:) comes and feeds the replay contents to the gamestate, so that the gamestate grows big and strong.

We can iterate this construction once more. You might have a meta-replay: This tells the computer when to move physics forward, when to move physics back, when to write a skill assignment into the replay, when to cut a replay by removing all assignments from it after a given physics update, ... The good thing that comes from meta-replays will be networked puzzle solving in a team, a.k.a., girlfriend mode.

Names of the ideas in this post are all preliminary and I don't want to force any of them into culture. In particular, meta-replay is awkward and nondescriptive. Multiplayer puzzle solving is at best a long-term loose idea for Lix.

You can read time-travelling science fiction, or you can write Lemmings-like games. :lix-grin:

-- Simon
« Last Edit: October 13, 2022, 10:51:24 AM by Simon »

Online Simon

  • Administrator
  • Posts: 3387
    • View Profile
    • Lix
Re: Simon blogs
« Reply #334 on: October 15, 2022, 02:54:57 PM »
> git co

...hmm, how did I name the branch again?
[Tab] [Tab] [Tab] [Tab] [Tab]

master
phys10
physideas
rmpre2018format
server
v10


Ah, v10 I called it. How could I have forgotten.

> git co git co v10

error: pathspec 'git' did not match any file(s) known to git
error: pathspec 'co' did not match any file(s) known to git
error: pathspec 'v10' did not match any file(s) known to git


Still pondering how to write a script around this typical user error. It's so mind-bashingly common.

-- Simon
« Last Edit: October 15, 2022, 09:05:00 PM by Simon »

Online Simon

  • Administrator
  • Posts: 3387
    • View Profile
    • Lix
Re: Simon blogs
« Reply #335 on: November 01, 2022, 03:20:08 AM »
On Writing Well

Communicating with Extreme Clarity: Blog post about bringing all readers to the same understanding. Be succinct, but keep what guards against different understandings:
  • When you explain a bugfix, describe both the prior wrong state and how the fix resolves that.
  • When you express ratios or subquantities, state them both in absolute numbers and as a percentage. State what exactly is the ratio of what exactly.
Hemingway Editor directly in the browser: Paste prose into this page, then copyedit according to the suggestions. Paste the result back to where you need it. I've ignored the formatting features. Undo is Ctrl+Z as usual, but redo is Ctrl+Shift+Z, not Ctrl+Y.

Buy a copy of Strunk & White, The Elements of Style. ("The fact that is an especially debilitating expression. It should be revised out of every sentence in which it occurs.")

Avoid "the former", "the latter". Instead, repeat the subjects. The explicit subjects save the reader from backtracking and decouple your logic. If the subjects need annoying relative clauses for restating, introduce good names earlier, then use those names.

-- Simon
« Last Edit: November 01, 2022, 05:51:57 AM by Simon »

Online Simon

  • Administrator
  • Posts: 3387
    • View Profile
    • Lix
Re: Simon blogs
« Reply #336 on: November 02, 2022, 03:55:18 AM »
It's possible to bring such clarification to Lix, e.g., add "100 %" or "all" or "lose 0" when the level has 40 lix, save 40. You can still compare 40 with 40 to conclude that you must save all, but it's also stated for you. Or write "39/40 (lose 1)" for 40 lix, save 39.

I've ranted about percentages in Lemmings for years. Indeed, 97 % is less useful than the positive save requirement 39/40 or the negative count, lose 1. But 100 % is still so common colloquially and needs no denominator (40) to compute; I feel like 100 % is special. I'll have to sleep over it. Probably just say "all".

This brings a typesetting issue: In German, best practice is to put a nonbreaking space between the number and the percent sign ("100 %"). Few Germans do this outside professional typesetting, but it's technically correct, the best kind of correct. In English, I haven't seen anybody put a space ("100%"). Is it correct to omit the space? That would treat % different than physical units; you'd write "220 V", "60 Hz" even in English.

-- Simon
« Last Edit: November 02, 2022, 04:16:55 AM by Simon »

Offline Dominator_101

  • Posts: 13
    • View Profile
Re: Simon blogs
« Reply #337 on: November 02, 2022, 12:33:21 PM »
In English, I haven't seen anybody put a space ("100%"). Is it correct to omit the space? That would treat % different than physical units; you'd write "220 V", "60 Hz" even in English.
As an only English speaker, I don't think I've ever seen someone put a space before a percent sign. Or at least, not that I can recall. It definitely looks weird to me.

And I wouldn't say that physical units always have a space in English, writing 220V or 60Hz is definitely normal, though adding the space there is probably more common than doing it for %. This might also depend on the unit though? I'm trying to think if there's any I would expect a space.

In fact, it looks like Google insists you don't put the space :P

Offline Proxima

  • Posts: 4435
    • View Profile
Re: Simon blogs
« Reply #338 on: November 02, 2022, 02:52:21 PM »

Offline kaywhyn

  • Posts: 1564
    • View Profile
Re: Simon blogs
« Reply #339 on: November 02, 2022, 04:17:07 PM »
As an only English speaker, I don't think I've ever seen someone put a space before a percent sign. Or at least, not that I can recall. It definitely looks weird to me.

The space between a number and the percent symbol is completely foreign to me. I have never ever seen anyone do that, but then again I hail from the USA, and it is convention here to not put a space between the number and percent symbol. Thus, we here in America write 5%, 10%, 100%, etc.

I've ranted about percentages in Lemmings for years. Indeed, 97 % is less useful than the positive save requirement 39/40 or the negative count, lose 1. But 100 % is still so common colloquially and needs no denominator (40) to compute; I feel like 100 % is special. I'll have to sleep over it. Probably just say "all".

That makes sense that 100% is special, considering that percent means "per hundred." It also does have connotations in the sense of the accomplishment of getting everything correct on a test or completing everything for examples, which can be very satisfying depending on what it is.

Quote
And I wouldn't say that physical units always have a space in English, writing 220V or 60Hz is definitely normal, though adding the space there is probably more common than doing it for %. This might also depend on the unit though? I'm trying to think if there's any I would expect a space.

In fact, it looks like Google insists you don't put the space :P

Yea, Simon's post got me to pause and think about how I write quantities with physical units. I honestly have always written them together with no space, e.g, 5ft for 5 feet rather than 5 ft. The latter is therefore strange and foreign to me as well. However, I read up on this, and the convention is to always put a space. In that case I've been writing them "wrong" for years! :-[ The exception is when you are dealing with notation symbols, like with the percent sign. In this situation, it's convention to not put a space between the number and it. Thus, that's why you see 10%. Then again, can we really say whether one way is truly incorrect and the other way is correct in either situation?

I think it's just a matter of personal preference/style. You can't really say either one is incorrect in writing them. The most common example I always see is the date format. Here in America, it's month/date/year, but in other countries, like in Europe, it's instead date/month/year. There's still even other variations, such as in my parents' home country of Vietnam, where the format is year/date/month edit: Wow, I apparently don't know what I'm talking about :-[ I'm wrong, it's the same as Europe, date/month/year, and also there's no place, it appears, that uses year/date/month, but there are places that use year/month/date. So, can we really say that any of these is incorrect in writing out the date shorthand? As I am accustomed to the American way of writing it due to where I grew up, there's absolutely no chance of me adopting the European way or any other country's way of writing the date other than month/date/year. However, since differing formats can lead to confusion, the safest way to avoid any is to simply write it out completely in words, e.g, November 2, 2022.
« Last Edit: November 06, 2022, 01:54:27 PM by kaywhyn »
https://www.youtube.com/channel/UCPMqwuqZ206rBWJrUC6wkrA - My YouTube channel and you can also find my playlists of Lemmings level packs that I have LPed
kaywhyn's blog: https://www.lemmingsforums.net/index.php?topic=5363.0

Online Simon

  • Administrator
  • Posts: 3387
    • View Profile
    • Lix
Re: Simon blogs
« Reply #340 on: November 12, 2022, 08:46:42 PM »
Thanks for the links and the discussion! Hmm, ISO 31-0 suggests the space before %, but nobody puts it colloqially.

Hard-ass scientific ISO norms, yes, that's about the minimal acceptable standard for typesetting in hobby computer games. :lix-cool: Jokes aside, the biggest benefit is that the style guide is international. The main question I had in the back of my mind was: Should I internationalize the typesetting of the percent sign or can I hardcode a single way?

I'm still wavering between "Goal: 40/40 (all)" and "Goal: 40/40 (100 %)", regardless of whether there will be a space. "Goal: 39/40 (lose 1)" is easier to decide. The only real alternative is to keep it as it is, "Goal: 39/40".

Re dates: ISO 8601 covers your back with 2022-12-31 a.k.a. the one true date format. Otherwise, spell the month with letters, as you suggest.

-- Simon