Author Topic: Simon blogs  (Read 130548 times)

0 Members and 2 Guests are viewing this topic.

Offline Simon

  • Administrator
  • Posts: 3860
    • View Profile
    • Lix
Re: Simon blogs
« Reply #330 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 »

Offline Simon

  • Administrator
  • Posts: 3860
    • View Profile
    • Lix
Re: Simon blogs
« Reply #331 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 »

Offline Simon

  • Administrator
  • Posts: 3860
    • View Profile
    • Lix
Re: Simon blogs
« Reply #332 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 »

Offline Simon

  • Administrator
  • Posts: 3860
    • View Profile
    • Lix
Re: Simon blogs
« Reply #333 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 »

Offline Simon

  • Administrator
  • Posts: 3860
    • View Profile
    • Lix
Re: Simon blogs
« Reply #334 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 »

Offline Simon

  • Administrator
  • Posts: 3860
    • View Profile
    • Lix
Re: Simon blogs
« Reply #335 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: 15
    • View Profile
Re: Simon blogs
« Reply #336 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: 4562
    • View Profile
Re: Simon blogs
« Reply #337 on: November 02, 2022, 02:52:21 PM »

Offline kaywhyn

  • Global Moderator
  • Posts: 1846
    • View Profile
Re: Simon blogs
« Reply #338 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

Offline Simon

  • Administrator
  • Posts: 3860
    • View Profile
    • Lix
Re: Simon blogs
« Reply #339 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

Offline kaywhyn

  • Global Moderator
  • Posts: 1846
    • View Profile
Re: Simon blogs
« Reply #340 on: December 06, 2022, 10:30:25 PM »
Re dates: ISO 8601 covers your back with 2022-12-31 a.k.a. the one true date format.

Ah, so I didn't make that up. Danke Simon. And the crowd and Germans go wild with excitement on my use of German :laugh: Only playing, but "thank you" is one that I happen to know in the language thanks to a Daffy Duck cartoon I watched (Daffy - the Commando) some time ago. It's such a common basic phrase that one should know in any language anyway!
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

Offline kaywhyn

  • Global Moderator
  • Posts: 1846
    • View Profile
Re: Simon blogs
« Reply #341 on: January 04, 2023, 06:57:49 AM »
Around December 20th to 24th, I'll weigh myself. For every 100 g above 78 kg, I will donate 1 euro to the hosting of Lemmings Forums. E.g., merely touching the goal weight of 80 kg is 20 euros. Being lazy and not losing weight at all is 110 euros.

Hi,

I had just remembered you mentioning a weight loss plan from sometime ago. It is now January 2023, and so I was wondering when we were going to get an update from you on this. How much funding will LF get according to your proposed weight loss plan? ???
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

Offline Simon

  • Administrator
  • Posts: 3860
    • View Profile
    • Lix
Re: Simon blogs
« Reply #342 on: January 04, 2023, 07:31:12 AM »
That ran until December 2021, not 2022. But I admit that I made the resolution too hard to see. I squashed it into an answer to WillLem.

84.7 kg before breakfast. For 5 weeks, I got lots of sleep and didn't overeat.

I'll call it here. Donation for LF hosting will be 67 Euros at the promised rate of 1 Euro per 100 g over 78 kg.

I should double-post more when the issues are clearly separate. It's not only easier to see, but also makes it possible to split the thread later.

New, but barely exciting, is that I gaind back all the weight in 2022, and acquired Christmas flab on top of it. We're at 92 kg.

-- Simon

Offline kaywhyn

  • Global Moderator
  • Posts: 1846
    • View Profile
Re: Simon blogs
« Reply #343 on: January 04, 2023, 09:44:48 AM »
Wow, of all things, I didn't bother to check the year :forehead: I'm not sure why I thought it was a goal you put down for 2022. I think I was too focused on the fact it was in June and hence I thought it was only about 6-7 months ago. Seriously, though, it's been 1.5 years since it was written down???? It definitely doesn't feel like it was that long ago. Then again, I probably could had figured out it was a 2021 goal just from the fact it's a couple of pages back, on page 20.

Please pass on any weight loss tips that have worked for you. I'm in a similar situation with wanting to lose weight and am slightly under your amount. The only thing that seems to have worked for me is eating less, though I have read online that what's important is not how much you eat but rather what you eat that determines whether you lose weight.
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

Offline Simon

  • Administrator
  • Posts: 3860
    • View Profile
    • Lix
Re: Simon blogs
« Reply #344 on: January 05, 2023, 05:07:30 PM »
Eating less is probably 70 % of the story and exercising is 20 %. The human body is a machine with input, storage, and output, and now we want to run with a net input/output deficit.

The most direct way to the net deficit is to eat less. Not necessarily less volume, but less energy.

To not be unhappy while eating less:
  • Eat only slightly less at first.
  • Fill the stomach with non-energy filler material. Drink more water or tea.
  • Choose foods with lower energy density. Have cucumber for snacking. The guinea pig diet from OP is to eat cucumber frequently. You can have it on bread as an extra topping, or even have it by itself.
  • In case of munchies: More cucumber.


Exercise is mediocre at burning calories directly. It's for building muscle. Muscle will cost the body energy to maintain, and you gain less fat meanwhile. Building muscle is like building harvesters at the beginning of a real-time strategy game, they'll keep working for you even when you're idle.

I have no experience or deeper knowledge of lopsided diets that force the body into burning fat faster. The regular burning of fat from eating less was good enough in the past for me.

-- Simon