High Council Matrix program

Discussions around miscellaneous technologies and projects for the general membership.
User avatar
mkmurray
Senior Member
Posts: 3266
Joined: Tue Jan 23, 2007 9:56 pm
Location: Utah
Contact:

Program Attached to this Post

#11

Post by mkmurray »

Well, I've gotten quite a few emails requesting the most recent version of this application. So here you go, I have attached it to this post. It's a zip file with the exe inside of it.

Just run it anywhere on your machine. No installation required. It can create and load files of extension HCC (High Council Circuit) containing a saved configuration in XML.

Thanks everyone.
Attachments
HighCouncilCircuit.zip
(9.69 KiB) Downloaded 360 times
User avatar
aebrown
Community Administrator
Posts: 15153
Joined: Tue Nov 27, 2007 8:48 pm
Location: Draper, Utah

HC Matrix

#12

Post by aebrown »

MKMurray,

Thank you for posting your application. I appreciate you taking the time not only to write the application but also to share it.

The one aspect of your application that makes it less than optimal, in my opinion, is that the speaking assignments are all clumped together. Take the example of a stake of 6 wards with 12 high councilors, with each ward being visited by a high councilor once per month. Your application will create a schedule where each high councilor speaks for six consecutive months, then does not speak for 6 more months.

When I worked out the schedule for my stake of 7 wards (manually of course :)), I made sure that no high councilor ever spoke more than two months in a row, and never had two consecutive months off. This distributes the assignments much more evenly. I know that adding such a requirement makes the algorithm more complicated, but the result is much more balanced.

Just a thought....
User avatar
mkmurray
Senior Member
Posts: 3266
Joined: Tue Jan 23, 2007 9:56 pm
Location: Utah
Contact:

#13

Post by mkmurray »

Alan_Brown wrote:MKMurray,

Thank you for posting your application. I appreciate you taking the time not only to write the application but also to share it.

The one aspect of your application that makes it less than optimal, in my opinion, is that the speaking assignments are all clumped together. Take the example of a stake of 6 wards with 12 high councilors, with each ward being visited by a high councilor once per month. Your application will create a schedule where each high councilor speaks for six consecutive months, then does not speak for 6 more months.

When I worked out the schedule for my stake of 7 wards (manually of course :)), I made sure that no high councilor ever spoke more than two months in a row, and never had two consecutive months off. This distributes the assignments much more evenly. I know that adding such a requirement makes the algorithm more complicated, but the result is much more balanced.

Just a thought....
Thanks for the suggestion. It's doubtful I'll get time to do this, but I could employ one of those spiffy algorithms I learned in college that gives different paths or outcomes different weights and then finds the best score. I'd have to pull out textbook and everything, but it would be a fun project to see what I can come up with. :)
User avatar
thedqs
Community Moderators
Posts: 1042
Joined: Wed Jan 24, 2007 8:53 am
Location: Redmond, WA
Contact:

#14

Post by thedqs »

mkmurray wrote:Thanks for the suggestion. It's doubtful I'll get time to do this, but I could employ one of those spiffy algorithms I learned in college that gives different paths or outcomes different weights and then finds the best score. I'd have to pull out textbook and everything, but it would be a fun project to see what I can come up with. :)

Do you want my old textbook??? :D Anyway to get it properly balanced an A* search might work with the number of times that one speaks adds additional weight to the next state.
- David
User avatar
mkmurray
Senior Member
Posts: 3266
Joined: Tue Jan 23, 2007 9:56 pm
Location: Utah
Contact:

High Council Matrix program algorithm

#15

Post by mkmurray »

thedqs wrote:Do you want my old textbook??? :D Anyway to get it properly balanced an A* search might work with the number of times that one speaks adds additional weight to the next state.
Well, in case someone wants to help the algorithm, I've attached the relevant spots of code in a text file. It is C# running on .NET 2.0.

If we go with an algorithm that applies weights to certain aspects of an outcome, I would like there to be variables so that they can be incorporated into the UI (so the user can modify weights to their liking). Also, tell us what your chosen default weights are. Thanks in advance.
Attachments
Algorithm.txt
(2.96 KiB) Downloaded 297 times
User avatar
thedqs
Community Moderators
Posts: 1042
Joined: Wed Jan 24, 2007 8:53 am
Location: Redmond, WA
Contact:

#16

Post by thedqs »

Took me a momment to realize it was C#.... And that is one of my favorite languages too.
- David
User avatar
mkmurray
Senior Member
Posts: 3266
Joined: Tue Jan 23, 2007 9:56 pm
Location: Utah
Contact:

#17

Post by mkmurray »

thedqs wrote:Do you want my old textbook??? :D Anyway to get it properly balanced an A* search might work with the number of times that one speaks adds additional weight to the next state.
So in order to find the right algoirthm, you have to understand the nature of the problem. What are the goals? Should every unit be visited every month? Maximize the rest time between assignments for each individual, while keeping it evenly distributed? Should special circumstances be considered (like a month with Ward Conference or Stake Conference)? Perhaps the last question is solved by just doing an 11 month schedule and shifting it as needed.

Well, to continue with the A* idea until further discussion progresses here, I have been using this wikipedia page as a guide for the algorithm: http://en.wikipedia.org/wiki/A*_search_algorithm

In short, f(x) = g(x) + h(x) for each unexpanded leaf node off of all already expanded nodes in the tree. g(x) is the cost from the start node to the current node being considered. h(x) is an admissible heurisitic, meaning it must underestimate the distance to the goal (for example, if we were finding the shortest path between two cities, it could be the straight-line distance even if there is not a valid path along that distance; this is why it "underestimates"). All f(x) values get put in a priority queue where lowest f(x) cost is the first-out.

So I can think of a possible h(x) function: The number of unit-month combinations still unassigned. This will give higher priority to nodes that are nearing a solution.

I'm kind of at a loss for a good g(x) function.

I'm also thinking that this is similar to the 8 queens problem (see http://en.wikipedia.org/wiki/Eight_queens_puzzle), so maybe whatever solution solves that can solve this (maybe a backtracking algorithm or something).
User avatar
thedqs
Community Moderators
Posts: 1042
Joined: Wed Jan 24, 2007 8:53 am
Location: Redmond, WA
Contact:

#18

Post by thedqs »

Since we want to spread out the speaking assignments maybe g(x) could be the number of empty months at after the last speaking assignment so if you got all 12 months filled you'd get g(x) of 0 but if after 6 months g(x) would be 6 saying that you didn't get to the end of the year.
- David
User avatar
mkmurray
Senior Member
Posts: 3266
Joined: Tue Jan 23, 2007 9:56 pm
Location: Utah
Contact:

#19

Post by mkmurray »

thedqs wrote:Since we want to spread out the speaking assignments maybe g(x) could be the number of empty months at after the last speaking assignment so if you got all 12 months filled you'd get g(x) of 0 but if after 6 months g(x) would be 6 saying that you didn't get to the end of the year.
Actually, what if g(x) is just the number of speaking assignments that individual already has assigned? That would give preference to those who currently have the least assignments. Wouldn't that give equal spacing between each assignment, while doing a round-robin approach? I'll see if I can do a proof of concept with it and post a diagram or something.
geek
Member
Posts: 100
Joined: Sun Dec 30, 2007 6:27 pm
Location: United States

#20

Post by geek »

I'm just a lowly ward clerk guys, but I'm bored today and I coded up a quick-and-dirty round-robin solution that ensures a balance of speaking assignments and accounts for ward conferences, etc. The only problem is that it does not seem to (a) evenly distribute the effects of a speaker's schedule -- meaning, a speaker may get a cluster of assignments and (b) a speaker may visit a ward twice. How important are these?

I have been playing with some other stuff today and thinking in ksh, but I can send you the solution. I've been testing it with different numbers of wards and ward conference configurations (including multiple wards having conference the same month, and it seems to work well, given the two caveats above).
Former membership clerk under 3 bishops, now on 2nd stint as executive secretary. Can I go back to teaching priesthood now?
Post Reply

Return to “Other Member Technologies”