Need help with an interesting variant of the travelling salesman problem

I’m working on an assignment in my CS class and the gist of the problem is as follows.

A salesman has a map of some apartments (over 300 blocks). I am given the (x,y) coordinates of each block as well as the “money” he will earn by visiting each block. I need to find the shortest route for the salesman to take such that he will earn x amount of money. He does not have to visit all the blocks. At the end of the day he will have to return to the origin (0,0).

I used a greedy algorithm by finding the shortest possible path he can take at each step. E.g from the origin I find the block with the lowest euclidean distance from the origin. Lets say this block is (2,2). I then find the block with the lowest euclidean distance from (2,2) until I have x amount of money. Using this greedy algorithm I then performed a 2-opt local search to improve my solution further.

The problem lies here though: when I perform a 3-opt local search using the implementation from wikipedia (https://en.wikipedia.org/wiki/3-opt), I get a much worse result than either the greedy or the 2-opt. Is there something wrong with the wiki code and if not, what did I do wrong? Thanks.

Are there any larger implications of allowing a variant rule Ability Score Improvement/Feats in a multi-classing campaign? [duplicate]

Are there any larger implications of allowing a variant rule Ability Score Improvement/Feats in a multi-classing campaign?

In one campaign we have all multi-class players. There has been a frustration about having to take a 4th or 8th level in a class for the sole purpose of having access to an Ability Score Improvement (ASI) or a Feat.

I want to suggest we have a character level progression system instead of class, when it comes to ability score improvements and feats. This seems simple enough. The majority of classes get an ASI or feat at levels 4, 8, 12, 16 and 19, with the exception of a Fighter who also gets this at levels 6 and 15.

The variant rule would be that a PC gets the option of an ASI/feat when it reaches character levels: 4, 8, 12, 16 and 19. If the player chooses to develop into the Fighter class, then that PC would get an ASI/feat upon reaching Fighter level 6 and 14.

There is a similar mechanic with cantrips for mult-classing players, where the upgrades depend on overall character level, rather than class level (PHB, p.164).

Variant Rule: Ability Score Improvement, or Feat

When you reach 4th level on your overall character level, and again at 8th, 12th, 16th, and 19th level, you can increase one ability score of your choice by 2, or you can increase two ability scores of your choice by 1. As normal, you can’t increase an ability score above 20 using this feature. The increase is based on your character level, not your level in a particular class. Using the optional feats rule, you can forgo taking the Ability Score Improvement feature and take a feat of your choice instead.

In addition, if you train as a Fighter, you get an Ability Score Improvement at upon reaching 6th and 14th level in that class.

Would this create any great unbalance? I can’t see it, but I might be missing something.

Variant Half-Elf: is this meant to be Keen Senses AND another trait?

The Sword Coast Adventurer’s Guide says:

Some half-elves in Faerûn have a racial trait in place of the Skill Versatility trait. If your DM allows it, your half-elf character can forgo Skill Versatility and instead take the elf trait Keen Senses or a trait based on your elf parentage:

Emphasis mine. The traits based on parentage are things like swim speed for aquatic elves or magic for drow parents. But here’s the thing. Skill Versatility is

You gain proficiency in two skills of your choice.

while Keen Senses is

You have proficiency in the Perception skill.

Why would one ever pick Keen Senses over Skill Versatility (with Perception and another skill)? Is this a design oversight, or a typo where it’s meant to be “and”, or is there something about these traits that I’m missing?

What is the reason Adventurers League games don’t allow DMG variant rules, such as Flanking?

Our home games have been running with the Variant Rule: Flanking while playing on a grid. It came to a surprise to us, when we first played in the Adventurer’s League, that Flanking is not allowed in AL play.

I’m considering adapting the no-flanking rule in our home games now, and was wondering what comment or statements WotC have said about why they don’t allow flanking in AL. I am hoping to gain insight on which to base a decision.

To be clear, I’m not looking for an answer on whether I should or should not allow flanking (this would obviously differ from table to table), neither am I inviting speculation as to the reason why AL doesn’t allow it. I am looking for a WotC-representative (or similar) commentary on why the DMG rule variants, especially flanking, is not allowed in organized Adventurer’s League play.

What does an Aquatic Half-Elf Variant mean?

Though I know this has been addressed somewhat here, here, and here, I am still getting a little confused on what a half-elf variant is, and how to consider this.

I understand that the main source of confusion comes from DnDBeyond:

Some half-elves in Faerûn have a racial trait in place of the Skill Versatility trait. If your DM allows it, your half-elf character can forgo Skill Versatility and instead take the elf trait Keen Senses or a trait-based on your elf parentage:

where the subsection ends with a colon pulled out of Swords of the Coast (p. 116):

HALF-ELF VARIANTS
Some half-elves in Faerûn have a racial trait in place of the Skill Versatility trait. If your DM allows it, your half-elf character can forgo Skill Versatility and instead take the elf trait Keen Senses or a trait based on your elf parentage:

  • A half-elf of wood elf descent can choose the wood elf’s Elf Weapon Training, Fleet of Foot, or Mask of the Wild.
  • A half-elf of moon elf or sun elf descent can choose the high elf’s Elf Weapon Training or Cantrip.
  • A half-elf of drow descent can choose the drow’s Drow Magic.
  • A half-elf of aquatic heritage can choose a swimming speed of 30 feet.

But, for me, that raised the question of what an Aquatic Elf is in the first place (thanks again to DnD Beyond linking to the same place or to the Elf page). So with a bit of research, I found Unearthed Arcana (2004) that talks about Sea Elfs and Aquatic Half-Elf, but there, it said that it was a union of an Aquatic-Elf and Aquatic-Human and gave much more attributes (such as dim vision, Bonus Language and Amphibian Trait).

So now I am completely confused about what’s going on and would like a little clarity on:

  • Do Aquatic Half-Elves need two aquatic parents?
  • What do Aquatic Half-Elves look like?
    • Does it change if one or both parents are aquatic?
  • Can a Land-Human Sea-Elf child have the amphibian trait?
  • If a Half-Elf foregoes Skill Versatility, do they also forgo the chance to Feat Prodige?

Does the UA class variant Ranger Companion Options gain the Rangers proficiency bonus as per the PHB Ranger’s Companion?

It is unclear to me how to reconcile the UA enhanced class variant Ranger Companion Option with the Beast Master Ranger’s Companion feature rules in the PHB.

Specifically, in the case of a 5th level ranger who chooses a Beast of the Air, would the Ranger add her proficiency bonus (3) to the beasts AC, attack rolls, damage rolls, saves, skills?

If yes, then what would the resulting stat-block look like for a Beast of the Air companion for a 5th level Beast Master Ranger.

How does the UA Variant Class Feature “Cunning Action: Aim” affect flying?

Cunning Action: Aim contains the following:

You can use this bonus action only if you haven’t moved during this turn, and after you use the bonus action, your speed is 0 until the end of the current turn.

Class Feature Variants Unearthed Arcana (page 9) Site PDF

Would a rogue under the effect of the fly spell be able to use this feature while in the air? If so, would he fall to the ground after using it? Does something change if they naturally have a fly speed and it isn’t from the fly spell?

Can I decide to use the human trait variant before or after rolling stats?

The Players Handbook has the following optional traits for humans:

Variant Human Traits

If your campaign uses the optional feat rules from chapter 7, your Dungeon Master might allow these variant traits, all of which replace the human’s Ability Score Increase trait.

Ability Score Increase. Two different ability scores of your choice increase by 1.

Skills. You gain proficiency in one skill of your choice.

Feat. You gain one feat of your choice.

(Player’s Handbook, page 31)

Can I decide to use this trait after rolling my stats, or do I have to make that decision before?

I ask because the stats that are rolled could result in big gains in total modifiers if all stats are increased, with a lot of odd numbers, but if you only get 2 or less odd numbers, increasing the other skills will not result in any increase to the total skill modifiers you end up with, and thus taking the optional traits would essentially net you a free feat and skill proficiency.

To illustrate, suppose I rolled 15, 13, 12, 11, 11, 9.
In this example, my modifiers would be +2, +1, +1, +0, +0, and -1 (total 3).
By taking the default trait, I would end up with 16, 14, 13, 12, 12, 10, and my modifiers would be +3, +2, +1, +1, +1, +0 with a total of 8 – a big improvement, whereas by taking the optional traits, I could only increase my modifiers 2, to 5 total. So in this circumstance I would prefer to take the overall increase.

Suppose instead I rolled 16, 14, 13, 12, 10, 10 with modifiers +3, +2, +1, +1, +0, +0.
In this instance taking the default trait I would end up with 17, 15, 14, 13, 11, 11 and modifiers +3, +2, +2, +1, +0, +0. This only net me an increase of 1 to my modifiers, which would be the same as taking the optional traits.
Hence in this situation, I would want to take the optional traits because the feat and skill proficiency are essentially free.

Is this Variant Monstrosity Druid balanced?

In my current campaign, I introduced a crazy scientist that uses mutagens in order to transform into different monsters. It’s really cool and really creepy. One of the characters in the party recently died and the corresponding player would be interested in playing a character similar to this NPC I introduced. His new character would be the scientist’s apprentice, who realized that his master is an evil psychopath, and now joins the party to do some hero stuff.

Long story short: I would like to offer my player the opportunity to play this kind of character, but I haven’t found a satisfying way to implement this concept with the available/official material and I’m not a fan of inventing a whole new class or subclass. So, I was looking for a simple solution and I came up with a variant of the druid class. Only slight changes are necessary, so I think it should be balanced:

  • Armor, weapon and saving throw proficiencies stay the same

  • Same skills to choose from

  • Alchemist’s supplies instead of herbalism kit

  • Wild Shape would function the same, but instead of transforming into beasts, this character would transform into monstrosities

  • Spellcasting like a sorcerer (spells known, etc.) with the sorcerer spell list, instead of preparing spells like a druid from the druid spell list. Wisdom would still be the spellcasting modifier.

  • Instead of Druidic as language, this character would be able to converse with monstrosities in their own language (e.g. Otyugh, Worg, Umber Hulk)

Obviously, not all druid subclasses would make sense with these changes to the core class, but I trust my player to choose a reasonable one. So right now, it’s just about the core class.

Is this Variant Druid balanced, compared to the regular druid class? Or am I overlooking something that will absolutely bite me in the ass?

Is the Way of the Four Elements monk subclass variant posted in a D&D Beyond article balanced?

In addition to a character builder and online rules source, D&D Beyond also has a blog, and that blog just posted Monk 101: Way of the Four Elements. This article notes

Regrettably, the Way of the Four Elements is not only one of the weakest monk subclasses, it’s one of the weakest subclasses in the Player’s Handbook.

… and gives reasonable justification for that statement. Then, it proposes:

If your Dungeon Master is willing to use house rules, consider using the following house rules to buff the Way of the Four Elements subclass:

  • Reduce the ki cost of all Elemental Disciplines by 2 (to a minimum of 1). This cost reduction is applied after you spend additional ki to raise the spell’s level. For example, the Fist of Four Thunders discipline lets you cast thunderwave for 2 ki. This cost is reduced to 1. Casting the spell at 2nd level increases the ki cost to 3, but it still only costs 1 ki point after the cost reduction of 2 points.
  • At 3rd level, you learn the Elemental Attunement discipline as normal, and two other disciplines of your choice (instead of just one).
  • You learn two new disciplines at 6th, 11th, and 17th level (instead of just one), and can replace any discipline you know with another one that you meet the level requirements to learn when you gain a level in this class.
  • You can also learn two cantrips of your choice from the following list: acid splash, fire bolt, mold earth, produce flame, ray of frost, shocking grasp. When you gain a level in this class, you can replace one of these cantrips with another instead of replacing an elemental discipline with another. (If you have other sources, such as Xanathar’s Guide to Everything or Elemental Evil Player’s Companion, you can choose other cantrips from those sources that deal acid, cold, fire, or lightning damage, or have an otherwise elemental theme, with your DM’s permission.)

As a DM, I want my players to have fun and I want them to be able to choose options that seem interesting without falling into “trap” classes which seem cool but turn out to be frustrating to play; on the other hand, I don’t want to just throw out home-brew options that are more powerful than the standard choices.

While the D&D Beyond rules section is official, this blog is really … just a blog, and I don’t think they have any particular insight into behind-the-curtains D&D design (although obviously they have contact with and work closely with the designers). But, D&D Beyond also has a central sort of voice, and while I’ve seen several home-brew attempts at “fixing” this subclass (including here, it seems like if this one is reasonable enough it might be something that 5E gamer consensus kind of builds around.

So… how reasonable is it? Does it achieve the goal of bringing the subclass into line?

  • Is this variant reasonably balanced against the other monk subclass options?
  • Is it comparable to other “third-caster” classes like Eldritch Knight or Arcane Trickster? What about to “half-casters” like Ranger and Paladin?