Author Topic: Solver for maximizing companions  (Read 1546 times)

0 Members and 1 Guest are viewing this topic.

ulber

  • Recruit
  • *
    • View Profile
  • Faction: Swadian
Solver for maximizing companions
« on: May 22, 2012, 12:59:57 PM »
I wrote a solver for finding maximal groups of companions and used it on the NE:WB companions. The information for the companions is from http://forums.taleworlds.com/index.php/topic,176395.msg4234744.html#msg4234744. Here are my results.

All of these groups are such that there are no dislikes between any members unless otherwise stated.

Simple maximal groups

The maximum group size is 8. There are four such groups:

  • xerina nizar tismanu klethi katrin aragorn deshavi vorian
  • xerina klethi aragorn erevan deshavi vorian bahestur achilles
  • thorgrim jinnai kelemvor erevan kana bahestur alyssa achilles
  • thorgrim nizar jinnai tismanu kelemvor katrin kana alyssa

If we have to have Jinnai, the only companion with engineering, then only the two latter groups apply.

Also note that there are no groups with Jinnai and one of the companions with surgery, Aragorn or Xerina. Because both Aragorn and Xerina dislike Jinnai there are no such groups at all.

Groups with high level compaions

There are four level 30 companions: Achilles, Alyssa, Kelemvor and Xerina. You can have at most 3 of them in one group and there is only one such group with a total of 8 companions: thorgrim jinnai kelemvor erevan kana bahestur alyssa achilles.

Other useful groups

Here is the only group of 8 companions that has Jinnai (engineering), Tismanu (good potential for surgery) and at least two high level companions: tismanu jinnai thorgrim nizar kelemvor katrin kana alyssa.

Unstable companions

I'll call a companion who has one like and one dislike "unstable". If we allow unstable companions then we get larger groups. You need to allow at least 4 unstable companions to get any improvement. The maximum group size with an unlimited number of unstable companions is 10. The only such group is: xerina thorgrim nizar jinnai katrin vorian kana bahestur alyssa achilles.

The maximum group size (with unstable companions) which includes all high level companions is 9. There are three such groups:

  • xerina thorgrim kelemvor aragorn erevan kana bahestur alyssa achilles
  • xerina thorgrim kelemvor klethi erevan deshavi bahestur alyssa achilles
  • xerina thorgrim tismanu kelemvor aragorn erevan kana alyssa achilles

The solver

The solver is written in answer set programming (ASP), which is an extension of logic programming that uses stable model semantics. Here is the solver:

(click to show/hide)

It uses the lparse parser and the clasp solver. I realize this is a somewhat esoteric language. If you wish to modify the solver then the lparse manual will serve as a good introduction.

Also if there are groups with some other (simplish) constraints you would like to have then just ask and I'll do the modifications and solving.
« Last Edit: May 22, 2012, 02:22:30 PM by ulber »

ulber

  • Recruit
  • *
    • View Profile
  • Faction: Swadian
Re: Solver for maximizing companions
« Reply #1 on: May 23, 2012, 01:45:01 PM »
By the way could someone comment do the "unstable" companions work, i.e., is the like enough to counteract the dislike? I think I read somewhere that this would work, but I haven't tried it yet.