Dominion Strategy Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 125 126 [127] 128 129 ... 273  All

Author Topic: The Necro Wars  (Read 346610 times)

0 Members and 1 Guest are viewing this topic.

silverspawn

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5326
  • Shuffle iT Username: sty.silver
    • View Profile
Re: The Necro Wars
« Reply #3150 on: March 29, 2022, 04:30:24 pm »

I confess that I was modelling you as optimizing something else.

Awaclus

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 11817
  • Shuffle iT Username: Awaclus
  • (´。• ω •。`)
    • View Profile
    • Birds of Necama
Re: The Necro Wars
« Reply #3151 on: March 30, 2022, 12:34:01 am »

I do think this thread has lots its purpose
Logged
Bomb, Cannon, and many of the Gunpowder cards can strongly effect gameplay, particularly in a destructive way

The YouTube channel where I make musicDownload my band's Creative Commons albums for free

silverspawn

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5326
  • Shuffle iT Username: sty.silver
    • View Profile
Re: The Necro Wars
« Reply #3152 on: March 30, 2022, 04:11:30 am »

but it has found a better one

silverspawn

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5326
  • Shuffle iT Username: sty.silver
    • View Profile
Re: The Necro Wars
« Reply #3153 on: March 30, 2022, 04:34:17 pm »

10 chess wins in a row, my longest ever streak, the 11th game I resolve to try really hard, but get matched against a former 1700 who for some reason is now <1500. Actually I'm proud that I made it a real match, that guy was so much stronger than me

silverspawn

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5326
  • Shuffle iT Username: sty.silver
    • View Profile
Re: The Necro Wars
« Reply #3154 on: April 01, 2022, 06:31:59 pm »

Another fun Python Exercise (if you want to learn the basics, not so much if you want to learn libraries)

Program a Sudoku solver. Nice thing about this is that it has a cleanly defined goal.

Easy Mode: program just one that looks at each cell, which numbers are possible in it, and inserts numbers of only one is possible
Medium Mode: also program the other approach, where you look at a number and a [column or row or 3x3 box], and if there is only one place for the number, insert that number there
Hard Mode: Do the above and then also recursively guess when you're stuck

There are in fact many sudokus that aren't solvable without guessing. That last part will only be a few lines but probably the hardest part, recursion is tricky.

silverspawn

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5326
  • Shuffle iT Username: sty.silver
    • View Profile
Re: The Necro Wars
« Reply #3155 on: April 01, 2022, 06:33:06 pm »

I've done this particular exercise four times in my life, in java, haskell, java again, and python. Was interesting tracking progress (how long I need to complete it).

faust

  • Board Moderator
  • *
  • Offline Offline
  • Posts: 3384
  • Shuffle iT Username: faust
    • View Profile
Re: The Necro Wars
« Reply #3156 on: April 02, 2022, 02:47:41 am »

Another fun Python Exercise (if you want to learn the basics, not so much if you want to learn libraries)

Program a Sudoku solver. Nice thing about this is that it has a cleanly defined goal.

Easy Mode: program just one that looks at each cell, which numbers are possible in it, and inserts numbers of only one is possible
Medium Mode: also program the other approach, where you look at a number and a [column or row or 3x3 box], and if there is only one place for the number, insert that number there
Hard Mode: Do the above and then also recursively guess when you're stuck

There are in fact many sudokus that aren't solvable without guessing. That last part will only be a few lines but probably the hardest part, recursion is tricky.
I've done this as one of my first programming exercises as well!

Interestingly, I did not do your "easy" bits first, instead went straight for the recursion. It was just a brute force program that would guess a possible number consecutively for each cell, and backtracked when there was no valid option, no smart deductions involved.
Logged
You say the ocean's rising, like I give a shit
You say the whole world's ending, honey it already did

silverspawn

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5326
  • Shuffle iT Username: sty.silver
    • View Profile
Re: The Necro Wars
« Reply #3157 on: April 02, 2022, 06:58:16 am »

Does this actually work for your average sudoku? I would have guessed that the tree gets too large and the program doesn't complete in a reasonable amount of time. (Obviously it would solve every sudoku given unlimited compute.)

silverspawn

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5326
  • Shuffle iT Username: sty.silver
    • View Profile
Re: The Necro Wars
« Reply #3158 on: April 02, 2022, 07:01:28 am »

MIRI announces new "Death With Dignity" strategy.

This is not an April Fool's Joke. Eliezer is unironically saying that things are so doomed that he's basically given up.

One more thing that makes me think that what i'm doing right now is super important. Things aren't anywhere near as grim as Yudkowsky thinks. I'm not sure how much I trust Miri that "functionalism-compatible" approaches to alignment are doomed, but if they are, that means all of the promising approaches involve ditching functionalism -- which he doesn't even consider.

silverspawn

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5326
  • Shuffle iT Username: sty.silver
    • View Profile
Re: The Necro Wars
« Reply #3159 on: April 02, 2022, 07:03:50 am »

RE sudoku, depends on how you define difficulty. The "guess only" program will be quite short, probably the longest part is where you check if you can show that your guess was wrong (because some cell has no more possible numbers). But it requires understanding recursion, which is probably much less of an issue if you have dealt with math for years.

silverspawn

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5326
  • Shuffle iT Username: sty.silver
    • View Profile
Re: The Necro Wars
« Reply #3160 on: April 02, 2022, 07:07:02 am »

In my first terrible java implementation, I did not understand recursion, so here is what I did--

after methods (1) and (2) stop leading to progress, the program searched for 5 cells that had exactly 2 possible numbers. Then it generated all 32 sequences of five bits (00000, 00001, ..., 11111), guessed all 32 combinations, and tried to solve the sudoku using all of them. This was powerful enough to solve most sudokus but obviously is not a general solver because guessing 5 numbers correctly doesn't guarantee that you will finish it.

silverspawn

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5326
  • Shuffle iT Username: sty.silver
    • View Profile
Re: The Necro Wars
« Reply #3161 on: April 02, 2022, 07:08:10 am »

Or rather I probably understodood recursion but not how to do it with java.

silverspawn

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5326
  • Shuffle iT Username: sty.silver
    • View Profile
Re: The Necro Wars
« Reply #3162 on: April 02, 2022, 07:50:37 am »

Another one of the t hings that come with my change of worldview is the "intelligence is a high-dimensional space" thing. It used to be really obvious to me that this is mostly BS because people clearly dislike the idea of putting people in a linear scale, hence they do extremely motivated reasoning when arguing about this. I instinctively trust the less appealing option much more.

But as with human brains being special, this was a mistake; just because lots of people say x for bad reasons doesn't make x false. If most of human intelligence is about aligning the substrate such that physics solves the problem for you, then IQ tests do only measure a small subset of what makes someone intelligent.

Which once again fits the evidence much better. E.g., Von Neumann had ridiculous IQ as measured by tests, possibly the greatest genius who ever lived, yet he was a Closed Individualist terrified of his own death. I don't know how many dimensions there should be, but it's more than one. I'd also confess that e.g. the Buddha probably was smarter than Neumann in some of them.

silverspawn

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5326
  • Shuffle iT Username: sty.silver
    • View Profile
Re: The Necro Wars
« Reply #3163 on: April 02, 2022, 07:54:08 am »

And this is also compatible with IQ tests being really predictive of lots of things because well if you can measure one dimension, even if it's a flawed measure, that's already much better than nothing. Better way to look at it is probably that IQ tests aren't a great predictor for anything, but everything we have is a worse predictor, so comparatively speaking they're very useful. It's not like you need to have a lot of absolute strength for statistical significance.

silverspawn

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5326
  • Shuffle iT Username: sty.silver
    • View Profile
Re: The Necro Wars
« Reply #3164 on: April 02, 2022, 07:59:08 am »

and (this is a theme) again this fits much better with introspection because they way to navigate the world on a daily basis really is not like the way you approach IQ test questions. At least for the most part; there are exceptions.

faust

  • Board Moderator
  • *
  • Offline Offline
  • Posts: 3384
  • Shuffle iT Username: faust
    • View Profile
Re: The Necro Wars
« Reply #3165 on: April 02, 2022, 08:04:17 am »

Does this actually work for your average sudoku? I would have guessed that the tree gets too large and the program doesn't complete in a reasonable amount of time. (Obviously it would solve every sudoku given unlimited compute.)
I think it worked out fine, though it was a long time ago and I don't remember the details. But the space of possible (not necessarily valid) fillings of a sudoku only has 9^3 elements, so I don't think computing time is much of an issue.
Logged
You say the ocean's rising, like I give a shit
You say the whole world's ending, honey it already did

faust

  • Board Moderator
  • *
  • Offline Offline
  • Posts: 3384
  • Shuffle iT Username: faust
    • View Profile
Re: The Necro Wars
« Reply #3166 on: April 02, 2022, 08:06:13 am »

RE sudoku, depends on how you define difficulty. The "guess only" program will be quite short, probably the longest part is where you check if you can show that your guess was wrong (because some cell has no more possible numbers). But it requires understanding recursion, which is probably much less of an issue if you have dealt with math for years.
Well, it was a first-semester course. I imagie my understanding was still quite patchy. Unfortunately I no longer have the code, would be interesting to look at now.
Logged
You say the ocean's rising, like I give a shit
You say the whole world's ending, honey it already did

silverspawn

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5326
  • Shuffle iT Username: sty.silver
    • View Profile
Re: The Necro Wars
« Reply #3167 on: April 02, 2022, 08:22:53 am »

9^3 what why

silverspawn

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5326
  • Shuffle iT Username: sty.silver
    • View Profile
Re: The Necro Wars
« Reply #3168 on: April 02, 2022, 08:26:01 am »

also why does that quantity matter? isn't it more something like, "if you only guess numbers with 2 possibilities, you will need 2^N steps where N is the number of unfilled squares? That could be something like 60, so 2^60 ~ 10^18 sounds intractable.

faust

  • Board Moderator
  • *
  • Offline Offline
  • Posts: 3384
  • Shuffle iT Username: faust
    • View Profile
Re: The Necro Wars
« Reply #3169 on: April 02, 2022, 08:39:34 am »

9^3 what why
It's a 9 by 9 grid and each field can have a number from 1 to 9?

So if you just take all the fillings of the grid with numbers from 1-9 given the starting conditions and look through for a valid one, you will need at most 9^3 checks (of course each of these requires checking all rows, columns and 3x3 boxes, so it's really 9^6).
« Last Edit: April 02, 2022, 08:44:17 am by faust »
Logged
You say the ocean's rising, like I give a shit
You say the whole world's ending, honey it already did

silverspawn

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5326
  • Shuffle iT Username: sty.silver
    • View Profile
Re: The Necro Wars
« Reply #3170 on: April 02, 2022, 08:44:06 am »

9^3 what why
It's a 9 by 9 grid and each field can have a number from 1 to 9?

So you you just take all the random fillings of the grid given the starting conditions and look through for a valid one, you will need at most 9^3 checks (of course each of these requires checking all rows, columns and 3x3 boxes, so it's really 9^6).

right, which would be 9^81 possibilities (of which most aren't sudokus)

faust

  • Board Moderator
  • *
  • Offline Offline
  • Posts: 3384
  • Shuffle iT Username: faust
    • View Profile
Re: The Necro Wars
« Reply #3171 on: April 02, 2022, 08:44:47 am »

9^3 what why
It's a 9 by 9 grid and each field can have a number from 1 to 9?

So you you just take all the random fillings of the grid given the starting conditions and look through for a valid one, you will need at most 9^3 checks (of course each of these requires checking all rows, columns and 3x3 boxes, so it's really 9^6).

right, which would be 9^81 possibilities (of which most aren't sudokus)
I'm confused, where does the 81 come from?

Oh yeah, nevermind, I got confused.
Logged
You say the ocean's rising, like I give a shit
You say the whole world's ending, honey it already did

faust

  • Board Moderator
  • *
  • Offline Offline
  • Posts: 3384
  • Shuffle iT Username: faust
    • View Profile
Re: The Necro Wars
« Reply #3172 on: April 02, 2022, 08:48:17 am »

Well my guess is if you do it recursively you're not going down very far most of these branches, but I'm not sure how to make a precise argument. I do remember that each solving took a couple of seconds with what I programmed then.
Logged
You say the ocean's rising, like I give a shit
You say the whole world's ending, honey it already did

silverspawn

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5326
  • Shuffle iT Username: sty.silver
    • View Profile
Re: The Necro Wars
« Reply #3173 on: April 02, 2022, 08:51:19 am »

Ya, that's certainly possible. I wasn't confident that it would be intractable.

If it took a few seconds, that's pretty clutch, because a priori I'd have errors bars of many orders of magnitude around the computing time, so it could have easily been a couple hours or a couple days (or a couple miliseconds)

silverspawn

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5326
  • Shuffle iT Username: sty.silver
    • View Profile
Re: The Necro Wars
« Reply #3174 on: April 02, 2022, 08:54:30 am »

And there may even be sudokus for which it takes hours. The ones you usually encounter are meant to be solvable in a reaosnable amount of time; you can also find far more difficult ones if you search online. And probably they would have branches that terminate later, though I'm not sure.

I'm almost tempted to try. The 'guess only' solver probably takes < 30 minutes to write.
Pages: 1 ... 125 126 [127] 128 129 ... 273  All
 

Page created in 0.168 seconds with 20 queries.