## How to program a situation like the following in mathematics and generalize the process to other configurations?

Distribute the numbers from 1 to 10(view image) so that the sum of each row and each column is the same and a) the maximum possible b) the minimum possible (I put it from 1 to 10 for ease)

I know it is a problem that could work with matrices or lists but I can’t think how to start

## how would a 12-digit password be a safe guard in this situation?

So guys, I messed up with the configs in a computer and let the SSH server open to the wild with ROOT login enabled. I’m trying to assess the potential damages, which I may never know for sure.

Regrets apart, this mistake lasted for over a year until I verified several SSH authentication attempts in secure.log (botnets and/or skiddies) with random users, but some tried with root. The secure.log shows that all root connection attempts failed and no break-in evidence, but I may not rely on those logs anymore.

My hopes resort in the fact that I changed the default SSH port (not really a security measure) plus a 12-digit password (capital and noncapital letters plus symbols, so 72^12 possibilities), however I don’t know if a 12-digit password is really worth a security matter these days. Even considering a swarm of botnets (between 300k to 6M), it would take years to break the password, but DoS and DDoS are other possibilities and I wanna try to reach some peace of mind.

Unfortunately, I had to format and re-install Linux in this computer given ongoing needs, but I’ve kept /var/log/ files in case of an investigation. The network admin (the computer wasn’t at my home) didn’t notice any suspicious activity, then I came up with a few possibilities after some research:

1. OK scenario: password was worth its length and hold any intruder.

Possible solution: harden security and (even) keep the OS.

Comment: the intruder may have cleared the logs to trick me, so better to be sure and format anyway.

1. Bad, but manageable scenario: someone managed to connect and setup a botnet/spammer/bitcoin miner.

Possible solution: format computer and harden security.

Comment: no suspicious network activity had been noticed and I’d have noticed some CPU stress and/or other symptoms, but none seen. However, I used only SSH terminal with no graphic interface (tty) in this computer, so symptoms would be possibly less evident (?).

1. Really a bad scenario: intruder accessed my computer and stole my data.

Possible solution: format computer and harden security.

Comment: OK I’d need to live with that, but the hardware would be reusable.

1. Worst-case scenario: intruder break-in plus a rootkit/keylogger/sniffer/worm.

Possible solution: format computer and harden security, unless a more serious intervention had been done, like BIOS or HDD/SSD firmware virus/rootkit.

Comment: I believe a hardware-level threat means game over for MB and SSD/HDD.

In summary: (1) would be fine; (2) seems very unlikely, since no alarms were triggered, (3) is bad, but hardware still OK, and (4) is the worst scenario. I believe a compromised root password is way worse than getting a rootkit from some suspicious downloaded app (just guessing), especially if it is nested into the hardware.

Therefore, scenario (4) worries me and I presume I don’t have any means to find out if my computer had an intervention at hardware level. Per my research, BIOS and SSD/HDD firmware hacks are possible and usually meant for high-level targets (not my case), but rare for ordinary users and very hardware-dependent (I found lots of debate on internet).

Any thought/ideas/suggestions in ways I could verify my hardware are appreciated.

## Situation calculus: how to find pre-conditions in 15-puzzle game?

I have been working on finding the preconditions for a situation calculus example for some time now. This example is called the game "15-puzzle" where you can find a discription here https://en.wikipedia.org/wiki/15_puzzle.

The following fluents are given for this game:

``at(x,y,z,s) // which means: there is a tile z at position x,y. free(x,y,s) // which means: position x,y is free. ``

And now I have to find the preconditions for the following actions (movements):

``move_up() move_down() move_left() move_right() ``

I have tried really cumbersome solutions where I am sure that they are not correct. I would be very grateful if someone has the right approach for me!

## My group is too big for my game, how to manage this situation?

So I may have a happy problem. I just finished a game with a group of five players, all of them enjoyed it and we’ve been talking about the next game we would start. None of them are problem players, none of them will refuse the invitation (I think) and ultimately all of them are friends and will know if one is excluded.

However, I find five players to be too much for me: due to the nature of the game we play, the kind of situations I like to set up and the time it takes to go through so many people while having some RP in there. Those issues make it so I have trouble running the game I’d like to run. Making it less enjoyable for me and, I think, for some of the players.

So… How can I, as a GM, deal with a group that’s too big for me if I don’t want to force someone out?

In a perfect world, one or two of the players would drop out of the game of their own volition. But realistically, I would like to drop one or two, which I don’t know how to go about making it happen, or make the game more manageable for the group I have.

Here are a few complications I have:

• Everyone is friend of everyone else, so merely not inviting someone is just excluding them and hoping they don’t notice or don’t mind being left out.
• Likewise, everyone seem to be looking forward to the next setting. So I don’t expect anyone to turn down the game unless there is a big change of playstyle.
• There are no obvious problem-players. The worst I have are follow-along-players. So I have no real ground to expel anyone.
• The playstyle I’ve found most enjoyable is one of low-combat and more RP and problem solving. Making kind of hard to engage five people.
• I also find I like to take the time to RP a bit even when resolving mostly basic rolls, so that resolving a full day’s exploration in a single roll and narating the result is not something I want to do frequently.

I found some question close to mine on the site, the closest I have is this one: How can I manage a party that has grown too big?. But it doesn’t help my problem. Mostly because on the focus on Roll20 and dnd (we run a homebrew system for which the closest comparison I have is: Dungeon World with crunchier combat).

For reference, Here are the main avenues I had in mind in case I still have five players for a while.

• Run the next game in a Westmarch-like style. Off-loading the burden of who is present to the players and giving me a reason to apply time pressure on the players. I’m not sure how feasable this is and may have to resort to selecting two nights instead of one. Based on our current speed. I can’t see how we could run a satisfying game in such a short time (that is partly my fault).
• Keep the group and keep a close eye on the playtime IRL, keep things focussed. This is what I’ve been doing and I know it has the side-effect of giving little to no spotlight on the players who goes in the wrong direction and the difference between right and wrong direction is jarring in my narration (and I know some players noticed a few time). If someone decides to leave because of it… I can slow down because I have a more manageable group now. If noone dislike it, then I may be alright. But that is not the kind of game I’d like to run.
• Keep the group and enforce a strict no-splitting rule. See how it goes. I tend to find 5 players+NPCs scenes tough to run and I expect the two least vocal players to just quit talking in such a game. But I can’t find another

## Friend wants to add a second magical effect to his belt, is there RAW situation for that?

A cleric in my group wants to add the effects of a +2 Belt of Incredible Dexterity to his Heavyload Belt(triples his carry load). Is that allowed, and if so, what would he need to do for it?

## Player is troubled with imagining the ingame situation

The Situation

I have been a gm for a few years on and off, for at least half a douzen of groups with at leat 20 different players and have played my fair share of systems.

A few weeks ago my colleagues asked my to introduce them to Roleplaying. I was delighted to share my passion with the people I see and talk to daily. We now have played two times with a group of me plus 4 player characters. Nearly all of the player were completely oblivious to role playing in general.

The problem

All in all the two sessions have been a lot of fun but I struggle with one of my players, that seems to have big problems with imagining the real situation the characters are in. Things like trying to build things without any of the necessary tools, trying to run from a enemy that is obviously about ten times as fast as him, although they have cover and are not yet discovered and so on. The result is that the other players and I are very confused and partially frustrated since those falsy interpretations can put the group in very rough spots, which is dampening everyones fun. Which in turn might demotivate the player in question.

What I tryed

I try to picture their situation as clearly as possible, even using a smartboard in the room we are playing in (we luckily can use one of the rooms in our office) to draw the current situations. Still these problems accured.

I never had this happen in one of my groups before. Is this to be expected and will sort itself out over time, or should I try to tell them even more?

Do you guys have any experience with players like this?

## When is it best to multi-class for a Bard in this specific situation?

I am hoping to keep this question quite focused so I will set the scene:

• I am starting my first D&D 5e campaign
• We are starting at level 3
• There is no rogue in the party so I am looking to absorb that role (No ‘tank’ either but hopefully that isn’t an issue)
• The others in the party are a Warlock of some kind, a Cleric of the Death Domain and a Duel-Wield Fighter
• I put equal focus on being good in combat (Controller) and out of combat (Face / Skillmonkey)
• I am set on being a Lore Bard, taking the Criminal background to get proficiency in Thieves Tools (Not married to the specific background however)

What I am looking to do with my build is multi-class (Single level dip) to try and add some extra effectiveness.

Cleric was recommended because I can get Heavy Armour Proficiency + other things but I like the Knowledge Domain for the skills and I think Heavy Armour would impact my casting anyway so happy with the Medium Armour proficiency instead.

If I do this when is best? Do I start as a Cleric, pick it before level 3 or wait until after level x?

I am looking for the (hidden?) downsides of taking it at any given level (Or taking it at all given the party make-up), and hopefully I think the main downsides of multi-classing in general are quite limited in this instance. I will lose a pretty poor capstone, get some spells a little later and not much else.

My thinking is to pick it for level 2 (Fits thematically as well – criminal bard, reformed / repented but needed the freedom again so went back to being a bard without the criminal part), but as this is my first character and our campaign is planned to level 20 I want to get it right, and having a Strength score of 9 already hurts the inner min/maxer in me.

There have been a few questions for information which I deliberately kept out at the start so we can keep the focus. I wasn’t looking for alternate builds as I thought that might be too broad but I do appreciate them so will give a bit more info.

Race: Half-Elf Str: 9 Dex: 14 + 1 (Racial) = 15 Cha: 15 + 2 (Racial) = 17 Other stats: 13, 12, 10

If I am picking Cleric I have to put 13 into Wis, which then gives 12 Con and 10 Int. Straight Bard would be 13 Con, 12 Int and 10 Wis.

The effectiveness I am looking for is actually anything. I have looked at Warlock for the combat, Cleric for either the skills or proficiency and Rogue because it fits my concept. I am not fixed on Cleric and my main concern is that Bard 19/Something 1 is better overall than Bard 20 with no huge traps that I am going to fall into at certain levels (Being a level behind for key features I can live with since Lore already gets Magical Secrets early).

I am also allowed to use any officially published classes / books etc as long as I can show the GM where things came from. But I only own the DMG and PHB (Not yet sure what the GM owns) and would prefer not to have to Google every time I use a class feature.

Apologies to those who feel I have been misleading. I tried to keep the initial question succinct but probably took it off topic myself. I have accepted an answer which not only answers the initial question (IE: Multi-class early) but provided an alternate build which I am actually going to follow.

## DeleteDuplicates DeleteDuplicatesBy used in a specific situation

How to use DeleteDuplicates or DeleteDuplicatesBy to delete duplicates inside list if I want to treat non-identical numbers, say $$1$$ and $$2$$ as identical?

I would define list of rules for identical numbers this way:

``identicalrules={{1,2},{3,4},{5,7},{6,8}} ``

Meaning that I want to treat $$1$$ and $$2$$ as identical, $$3$$ and $$4$$ as identical, $$5$$ and $$7$$ as identical and $$6$$ and $$8$$ as identical.

Then I want to delete duplicates of this list:

``li={{1,2,3},{3,5,8},{4,7,6},{2,1,3}} ``

Output should be:

``{{1,2,3},{3,5,8}} ``

because according to my rules {2,1,3} is duplicate of {1,2,3} and {4,7,6} is duplicate of {3,5,8}.

I would like the code to be something like this:

``DeleteDuplicates[li,identicalrules] ``

or

``DeleteDuplicatesBy[li,identicalrules] ``

I also tried a simple example where $$1$$ and $$2$$ should be treated as identical:

``DeleteDuplicatesBy[{1, 2, 3, 4, 5, 6, 7, 8, 9}, # == 1 \[Or] # == 2 &] ``

But the output was:

``{1, 3} ``

``{1,3,4,5,6,7,8,9} ``

which I wanted to be like it.

Attention: While I want to treat $$1$$ and $$2$$ as identical it does not mean I accept replacing $$1$$ by $$2$$ or vice-versa.

## Can I execute code in this situation?

There is a code snippet like that in a php based web application.

``<form action="home.php?parameter=<?php echo \$  _GET['parameter'] ?>" method="post"> ``

Can I execute arbitrary code using get “parameter”?

## Accidentally let party wander into a high level situation, how do I help them get out without cheesing?

TL;DR – due to poor planning on my part in my sandbox-esque game, a party of four Level 5s (fighter, warlock, non-healer bard, wizard) is about to wander into a high level situation and I’d like them to not die while still letting them accomplish something.

Here’s the situation.

The party recently emerged from the Feywild to find that two months had passed on the outside. They ended up near the capital city. Okay, cool. I prepare some rumors they can dig up so they can help find out what they missed. One character in particular has a lot of backstory in the capital, so we hashed out some of the relevant NPCs.

In an attempt to set up and highlight how tensions are escalating in the kingdom with the threat of war on the horizon, as well as to set up an NPC Big Bad later, I let them find out that some people around the capital have been “disappearing” on order of the Queen’s Spymaster because they were suspected of being spies for the enemy empire. The Queen herself has been rumored to be ill and has definitely become hard to get a hold of. One of the NPCs who disappeared was one of a character’s school friends, who we’d hashed out the existence of between sessions.

Now, these disappearances were all on trumped up charges. The character who’d spent the most time in the capital actually is a spy for the enemy empire and would know this. She was adamant – and correctly so – that her friend was innocent.

What I expected to happen – and this is on me – was that they’d hear that the second most powerful person in the kingdom had a direct hand in these events and get out of town. The entire group is Level 5. I expected this entire setup to be set dressing for stuff they’d deal with later. It’s not like they don’t have a lot of side quests and leads to chase down elsewhere.

Instead, they resolved to do whatever they could to rescue this girl and get to the bottom of the situation.

Here’s what I know that they have no feasible way to find out at this point:

• The Queen’s Spymaster has defected – she’s orchestrating events to deliberately try and undercut faith in the government as well as generally sow chaos
• She’s not operating in the good faith the group assumes she is. This is not an innocent mistake or paranoia they can assuage.
• The Queen’s Spymaster is actually one of the six heroes of long ago legend and is thus a Level 15 assassin living in secret.
• The Queen herself is not even in the city at this time, and (as a high level sorcerer) she’s left a simulacrum in her place to help allay suspicion.
• The group has rolled really badly on Perception checks to see if they’re being tailed and they are, in fact, being intermittently tailed.

I don’t want to punish them for jumping in to this plot with both feet. I don’t want to stonewall them from finding this missing girl since they’re super invested in doing so, and they know she’s still in the city.

How can I help arrange things so they have a chance of succeeding while still putting them in a reasonable amount of danger?