Skip to content

newageoflight/stack_sim

Repository files navigation

HETI Stack Simulator - An Experimental Report

Introduction

  • Disclaimer: there is NO guarantee that any of this is accurate. It is only based on hearsay about how the stack algorithm works
  • Nonetheless, let’s try to find out what the best strategy is for ordering your hospital preferences

The algorithm

HETI’s 2021 algorithm

  • HETI uses an approach called ”simulated annealing
  • It’s an algorithm commonly used in AI that tries to find the global minimum (or maximum) of a function
    • The name comes from the idea that if you freeze a hot liquid quickly it won’t form nice crystals, but if you do it slowly it will because the particles are more likely to find the lowest energy (lattice) state.
    • Likewise, when our system is “hot” it is more likely to jump over “energy barriers” (i.e. make decisions that initially appear unfavourable but might lead to less overall unhappiness on the other side). The slower we cool it, the more likely our system is to find the global minimum.
  • It starts by randomly allocating people per category
    • All category 1 applicants are matched to a random hospital.
    • Anyone below will have this process applied to them:
      • If there are more applicants than spots, HETI’s server randomises the list of applicants and takes from the top however many would fill the remaining spots.
  • Now for the fancy AI part
    • At this point, everyone who is in a hospital will have a certain “unhappiness score” calculated from what position the hospital they got was in their preferences list minus 1 (so, zero if you got your favourite).
    • The algorithm will try swapping two people. If it results in a net increase in happiness and doesn’t overload hospital capacity, the swap is more likely to be followed through with. If not, nothing happens.
    • The algorithm keeps doing this for a large number of iterations.
  • Henceforth for brevity this method will be referred to as the “AI algorithm”

Other conceptions

  • Categorical allocation has also been previously understood as the method for allocation.
  • This basically involves allocating people first by category, then according to preference. The last iteration of this article was based on this conception.

Implementation

  • These scenarios were tested:
    1. Everybody preferences hospitals entirely randomly
    2. Everybody stacks
    3. Everybody stacks but moves a random hospital of their choice to first place
    4. Everybody stacks but moves random hospitals of their choice to 1st and 12th places
    5. Everybody stacks but moves random hospitals of their choice to 1st and 14th places
    6. Everybody stacks but moves random hospitals of their choice to 1st and 2nd places
  • Incomplete list of deviations from reality, simplifications and assumptions:
    1. With unweighted randomness, it is assumed that no hospital is more favourable than another.
    2. With weighted randomness, hospital favourability at all levels is assumed to be similar to that at the first preference. That is, the probability-weight of a simulated applicant selecting each hospital is correlated with their popularity based on last year’s survey.
    3. Either everybody having the same stack or using two different variants of the stack were tested.
    4. Everyone who applies accepts the first job offer they get.
    5. DRA and other pathways that cannot be considered part of the optimised allocation algorithm have not been accounted for in running the simulation. However, parts of it are included as options in the code if you want to try it yourself.
    6. Only 1 round of offers is simulated. Rejections are not accounted for.
    7. Corollary from 4-6: Category 1 applicants are basically guaranteed a job.
    8. Corollary from 7: Anyone category 3 or below will not get a job.
    9. [from a reader] IRL, category 2 placements and beyond tend to be based more on luck of the draw (offer timing, rounds, category 1 rejections).
    10. Corollary from 8,9: in terms of informing you as to what to do, this simulation is basically worthless for anyone outside of category 1, and maybe 2.
  • The ones you should be looking at are the AI algorithm + weighted random selection. The unweighted is included merely for comparison.
  • For nerds: the actual code of this simulation is on Github. Parameters used in the simulation:
    ParameterValue
    α0.0002
    T10000

Results

How to read the tables:

nth
Number of applicants that got their nth preference
catn
Category n applicants
placed
Applicants who matched into any hospital
not_placed
Applicants who did not match into any hospital

AI algorithm + weighted random selection

Weighted random

./images/weighted_random_anneal_satisfied.png

totalcat1cat2cat3cat4cat5cat6
1st174161130000
2nd169158110000
3rd13612880000
4th116106100000
5th857780000
6th867880000
7th706550000
8th363150000
9th312560000
10th252320000
11th292810000
12th181710000
13th141310000
14th6600000
15th1010000
placed996916800000
not_placed543012215814810114
total153991620215814810114

Total

./images/weighted_random_anneal_satisfied_total.png

Category 1

./images/weighted_random_anneal_satisfied_cat1.png

Category 2

./images/weighted_random_anneal_satisfied_cat2.png

All stack

./images/all_stack_anneal_satisfied.png

totalcat1cat2cat3cat4cat5cat6
1st645950000
2nd716740000
3rd514740000
4th544950000
5th494630000
6th766970000
7th12111290000
8th403640000
9th125113120000
10th747040000
11th514560000
12th686170000
13th666240000
14th635670000
15th272430000
placed1000916840000
not_placed539011815814810114
total153991620215814810114

Total

./images/all_stack_anneal_satisfied_total.png

Category 1

./images/all_stack_anneal_satisfied_cat1.png

Category 2

./images/all_stack_anneal_satisfied_cat2.png

Mixed stacks

./images/mixed_stacks_anneal_satisfied.png

totalcat1cat2cat3cat4cat5cat6
1st635490000
2nd726750000
3rd514470000
4th545130000
5th494720000
6th766880000
7th928570000
8th696270000
9th12511780000
10th746860000
11th514650000
12th797270000
13th555230000
14th635940000
15th252410000
placed998916820000
not_placed541012015814810114
total153991620215814810114

Total

./images/mixed_stacks_anneal_satisfied_total.png

Category 1

./images/mixed_stacks_anneal_satisfied_cat1.png

Category 2

./images/mixed_stacks_anneal_satisfied_cat2.png

All same stack with weighted random first

./images/all_same_stack_with_weighted_random_first_anneal_satisfied.png

totalcat1cat2cat3cat4cat5cat6
1st746860000
2nd646040000
3rd494630000
4th686440000
5th545130000
6th514830000
7th125114110000
8th666240000
9th121106150000
10th635850000
11th7666100000
12th545130000
13th403730000
14th514830000
15th403730000
placed996916800000
not_placed543012215814810114
total153991620215814810114

Total

./images/all_same_stack_with_weighted_random_first_anneal_satisfied_total.png

Category 1

./images/all_same_stack_with_weighted_random_first_anneal_satisfied_cat1.png

Category 2

./images/all_same_stack_with_weighted_random_first_anneal_satisfied_cat2.png

All same stack with weighted random first and 12th

./images/all_same_stack_with_weighted_random_first_and_12th_anneal_satisfied.png

totalcat1cat2cat3cat4cat5cat6
1st716740000
2nd766970000
3rd645680000
4th125112130000
5th544950000
6th544590000
7th686530000
8th514740000
9th12111470000
10th746680000
11th515010000
12th666150000
13th494450000
14th403820000
15th373340000
placed1001916850000
not_placed538011715814810114
total153991620215814810114

Total

./images/all_same_stack_with_weighted_random_first_and_12th_anneal_satisfied_total.png

Category 1

./images/all_same_stack_with_weighted_random_first_and_12th_anneal_satisfied_cat1.png

Category 2

./images/all_same_stack_with_weighted_random_first_and_12th_anneal_satisfied_cat2.png

All same stack with weighted random first and 14th

./images/all_same_stack_with_weighted_random_first_and_14th_anneal_satisfied.png

totalcat1cat2cat3cat4cat5cat6
1st544950000
2nd125113120000
3rd494540000
4th6856120000
5th747040000
6th646130000
7th665970000
8th121109120000
9th514740000
10th716650000
11th545220000
12th767150000
13th404000000
14th514650000
15th333210000
placed997916810000
not_placed542012115814810114
total153991620215814810114

Total

./images/all_same_stack_with_weighted_random_first_and_14th_anneal_satisfied_total.png

Category 1

./images/all_same_stack_with_weighted_random_first_and_14th_anneal_satisfied_cat1.png

Category 2

./images/all_same_stack_with_weighted_random_first_and_14th_anneal_satisfied_cat2.png

All same stack with weighted random first and 2nd

./images/all_same_stack_with_weighted_random_first_and_2nd_anneal_satisfied.png

totalcat1cat2cat3cat4cat5cat6
1st514560000
2nd666150000
3rd7666100000
4th125115100000
5th544950000
6th12111290000
7th403820000
8th635850000
9th545130000
10th686260000
11th494720000
12th646130000
13th746950000
14th716290000
15th222020000
placed998916820000
not_placed541012015814810114
total153991620215814810114

Total

./images/all_same_stack_with_weighted_random_first_and_2nd_anneal_satisfied_total.png

Category 1

./images/all_same_stack_with_weighted_random_first_and_2nd_anneal_satisfied_cat1.png

Category 2

./images/all_same_stack_with_weighted_random_first_and_2nd_anneal_satisfied_cat2.png

Mixed stacks with weighted random first

./images/mixed_stacks_with_weighted_random_first_anneal_satisfied.png

totalcat1cat2cat3cat4cat5cat6
1st134119150000
2nd10810170000
3rd767240000
4th184170140000
5th1079890000
6th565330000
7th6553120000
8th11510690000
9th303000000
10th151500000
11th585620000
12th494360000
13th0000000
14th0000000
15th0000000
placed997916810000
not_placed542012115814810114
total153991620215814810114

Total

./images/mixed_stacks_with_weighted_random_first_anneal_satisfied_total.png

Category 1

./images/mixed_stacks_with_weighted_random_first_anneal_satisfied_cat1.png

Category 2

./images/mixed_stacks_with_weighted_random_first_anneal_satisfied_cat2.png

Mixed stacks with weighted random first and 12th

./images/mixed_stacks_with_weighted_random_first_and_12th_anneal_satisfied.png

totalcat1cat2cat3cat4cat5cat6
1st9484100000
2nd11110470000
3rd14213660000
4th534670000
5th196176200000
6th615830000
7th555140000
8th585260000
9th413650000
10th665970000
11th767330000
12th433940000
13th1100000
14th0000000
15th1100000
placed998916820000
not_placed541012015814810114
total153991620215814810114

Total

./images/mixed_stacks_with_weighted_random_first_and_12th_anneal_satisfied_total.png

Category 1

./images/mixed_stacks_with_weighted_random_first_and_12th_anneal_satisfied_cat1.png

Category 2

./images/mixed_stacks_with_weighted_random_first_and_12th_anneal_satisfied_cat2.png

Mixed stacks with weighted random first and 14th

./images/mixed_stacks_with_weighted_random_first_and_14th_anneal_satisfied.png

totalcat1cat2cat3cat4cat5cat6
1st146135110000
2nd514290000
3rd726750000
4th827660000
5th11811170000
6th777340000
7th898090000
8th184168160000
9th676070000
10th363330000
11th171520000
12th363420000
13th111100000
14th101000000
15th1100000
placed997916810000
not_placed542012115814810114
total153991620215814810114

Total

./images/mixed_stacks_with_weighted_random_first_and_14th_anneal_satisfied_total.png

Category 1

./images/mixed_stacks_with_weighted_random_first_and_14th_anneal_satisfied_cat1.png

Category 2

./images/mixed_stacks_with_weighted_random_first_and_14th_anneal_satisfied_cat2.png

Mixed stacks with weighted random first and 2nd

./images/mixed_stacks_with_weighted_random_first_and_2nd_anneal_satisfied.png

totalcat1cat2cat3cat4cat5cat6
1st124114100000
2nd118107110000
3rd655870000
4th868060000
5th14613790000
6th585440000
7th10491130000
8th807460000
9th575340000
10th656140000
11th766970000
12th171520000
13th2110000
14th0000000
15th3210000
placed1001916850000
not_placed538011715814810114
total153991620215814810114

Total

./images/mixed_stacks_with_weighted_random_first_and_2nd_anneal_satisfied_total.png

Category 1

./images/mixed_stacks_with_weighted_random_first_and_2nd_anneal_satisfied_cat1.png

Category 2

./images/mixed_stacks_with_weighted_random_first_and_2nd_anneal_satisfied_cat2.png

AI algorithm + unweighted random selection

All random

./images/all_random_anneal_satisfied.png

totalcat1cat2cat3cat4cat5cat6
1st619563560000
2nd257242150000
3rd817380000
4th322930000
5th7700000
6th2200000
7th1010000
8th0000000
9th0000000
10th0000000
11th0000000
12th0000000
13th0000000
14th0000000
15th0000000
placed999916830000
not_placed540011915814810114
total153991620215814810114

Total

./images/all_random_anneal_satisfied_total.png

Category 1

./images/all_random_anneal_satisfied_cat1.png

Category 2

./images/all_random_anneal_satisfied_cat2.png

All stack

See previous section

Mixed stacks

See previous section

All same stack with random first

./images/all_same_stack_with_random_first_anneal_satisfied.png

totalcat1cat2cat3cat4cat5cat6
1st514650000
2nd716470000
3rd686530000
4th645590000
5th746680000
6th545040000
7th544950000
8th12511780000
9th666330000
10th494630000
11th514560000
12th403910000
13th635760000
14th767150000
15th9583120000
placed1001916850000
not_placed538011715814810114
total153991620215814810114

Total

./images/all_same_stack_with_random_first_anneal_satisfied_total.png

Category 1

./images/all_same_stack_with_random_first_anneal_satisfied_cat1.png

Category 2

./images/all_same_stack_with_random_first_anneal_satisfied_cat2.png

All same stack with random first and 12th

./images/all_same_stack_with_random_first_and_12th_anneal_satisfied.png

totalcat1cat2cat3cat4cat5cat6
1st747040000
2nd494720000
3rd544770000
4th514830000
5th403730000
6th7160110000
7th635940000
8th666060000
9th545130000
10th686710000
11th645590000
12th12511780000
13th766970000
14th514740000
15th918290000
placed997916810000
not_placed542012115814810114
total153991620215814810114

Total

./images/all_same_stack_with_random_first_and_12th_anneal_satisfied_total.png

Category 1

./images/all_same_stack_with_random_first_and_12th_anneal_satisfied_cat1.png

Category 2

./images/all_same_stack_with_random_first_and_12th_anneal_satisfied_cat2.png

All same stack with random first and 14th

./images/all_same_stack_with_random_first_and_14th_anneal_satisfied.png

totalcat1cat2cat3cat4cat5cat6
1st635850000
2nd545040000
3rd746860000
4th494180000
5th666420000
6th121109120000
7th646130000
8th686350000
9th545040000
10th514830000
11th767330000
12th125108170000
13th404000000
14th716560000
15th211830000
placed997916810000
not_placed542012115814810114
total153991620215814810114

Total

./images/all_same_stack_with_random_first_and_14th_anneal_satisfied_total.png

Category 1

./images/all_same_stack_with_random_first_and_14th_anneal_satisfied_cat1.png

Category 2

./images/all_same_stack_with_random_first_and_14th_anneal_satisfied_cat2.png

All same stack with random first and 2nd

./images/all_same_stack_with_random_first_and_2nd_anneal_satisfied.png

totalcat1cat2cat3cat4cat5cat6
1st686260000
2nd716470000
3rd747220000
4th665970000
5th494450000
6th403640000
7th514920000
8th121107140000
9th767240000
10th545220000
11th514470000
12th125115100000
13th635670000
14th646130000
15th262330000
placed999916830000
not_placed540011915814810114
total153991620215814810114

Total

./images/all_same_stack_with_random_first_and_2nd_anneal_satisfied_total.png

Category 1

./images/all_same_stack_with_random_first_and_2nd_anneal_satisfied_cat1.png

Category 2

./images/all_same_stack_with_random_first_and_2nd_anneal_satisfied_cat2.png

Mixed stacks with random first

./images/mixed_stacks_with_random_first_anneal_satisfied.png

totalcat1cat2cat3cat4cat5cat6
1st19318490000
2nd1039580000
3rd878070000
4th726660000
5th130119110000
6th665880000
7th544860000
8th403640000
9th221840000
10th474250000
11th13112380000
12th5500000
13th302730000
14th161510000
15th0000000
placed996916800000
not_placed543012215814810114
total153991620215814810114

Total

./images/mixed_stacks_with_random_first_anneal_satisfied_total.png

Category 1

./images/mixed_stacks_with_random_first_anneal_satisfied_cat1.png

Category 2

./images/mixed_stacks_with_random_first_anneal_satisfied_cat2.png

Mixed stacks with random first and 12th

./images/mixed_stacks_with_random_first_and_12th_anneal_satisfied.png

totalcat1cat2cat3cat4cat5cat6
1st11811260000
2nd10895130000
3rd11310580000
4th11510690000
5th867880000
6th11510870000
7th433850000
8th154139150000
9th938850000
10th171520000
11th9900000
12th201910000
13th1100000
14th3300000
15th0000000
placed995916790000
not_placed544012315814810114
total153991620215814810114

Total

./images/mixed_stacks_with_random_first_and_12th_anneal_satisfied_total.png

Category 1

./images/mixed_stacks_with_random_first_and_12th_anneal_satisfied_cat1.png

Category 2

./images/mixed_stacks_with_random_first_and_12th_anneal_satisfied_cat2.png

Mixed stacks with random first and 14th

./images/mixed_stacks_with_random_first_and_14th_anneal_satisfied.png

totalcat1cat2cat3cat4cat5cat6
1st9281110000
2nd12311580000
3rd13612880000
4th8070100000
5th403820000
6th120110100000
7th696540000
8th525020000
9th696180000
10th494540000
11th585260000
12th171700000
13th383170000
14th494270000
15th111100000
placed1003916870000
not_placed536011515814810114
total153991620215814810114

Total

./images/mixed_stacks_with_random_first_and_14th_anneal_satisfied_total.png

Category 1

./images/mixed_stacks_with_random_first_and_14th_anneal_satisfied_cat1.png

Category 2

./images/mixed_stacks_with_random_first_and_14th_anneal_satisfied_cat2.png

Mixed stacks with random first and 2nd

./images/mixed_stacks_with_random_first_and_2nd_anneal_satisfied.png

totalcat1cat2cat3cat4cat5cat6
1st165147180000
2nd767240000
3rd665970000
4th464600000
5th827570000
6th13112290000
7th787170000
8th545220000
9th8171100000
10th797540000
11th10995140000
12th131210000
13th9810000
14th4220000
15th10910000
placed1003916870000
not_placed536011515814810114
total153991620215814810114

Total

./images/mixed_stacks_with_random_first_and_2nd_anneal_satisfied_total.png

Category 1

./images/mixed_stacks_with_random_first_and_2nd_anneal_satisfied_cat1.png

Category 2

./images/mixed_stacks_with_random_first_and_2nd_anneal_satisfied_cat2.png

AI algorithm convergence

The algorithm converges on the minimum global unhappiness fastest when everyone stacks, slowest when everyone selects a weighted-random preference list.

I seriously don’t know where HETI gets the “millions of iterations” figure from, these models converged far faster than that. And it can’t be a pure brute force algorithm either (that’s \(O(M× N!)\), where N is the number of applicants and M the number of hospitals for you nerds out there), as that would require testing more combinations than there are atoms in the universe.

How to read the legend:

min_unhappiness
Minimum possible global unhappiness determined so far
current_unhappiness
Global unhappiness of the current iteration

All random

./images/conv_all_random_anneal.png

Weighted random

./images/conv_weighted_random_anneal.png

All stack

./images/conv_all_stack_anneal.png

Mixed stacks

./images/conv_mixed_stacks_anneal.png

All same stack with random first

./images/conv_all_same_stack_with_random_first_anneal.png

All same stack with weighted random first

./images/conv_all_same_stack_with_weighted_random_first_anneal.png

All same stack with random first and 12th

./images/conv_all_same_stack_with_random_first_and_12th_anneal.png

All same stack with weighted random first and 12th

./images/conv_all_same_stack_with_weighted_random_first_and_12th_anneal.png

All same stack with random first and 14th

./images/conv_all_same_stack_with_random_first_and_14th_anneal.png

All same stack with weighted random first and 14th

./images/conv_all_same_stack_with_weighted_random_first_and_14th_anneal.png

All same stack with random first and 2nd

./images/conv_all_same_stack_with_random_first_and_2nd_anneal.png

All same stack with weighted random first and 2nd

./images/conv_all_same_stack_with_weighted_random_first_and_2nd_anneal.png

Mixed stacks with random first

./images/conv_mixed_stacks_with_random_first_anneal.png

Mixed stacks with weighted random first

./images/conv_mixed_stacks_with_weighted_random_first_anneal.png

Mixed stacks with random first and 12th

./images/conv_mixed_stacks_with_random_first_and_12th_anneal.png

Mixed stacks with weighted random first and 12th

./images/conv_mixed_stacks_with_weighted_random_first_and_12th_anneal.png

Mixed stacks with random first and 14th

./images/conv_mixed_stacks_with_random_first_and_14th_anneal.png

Mixed stacks with weighted random first and 14th

./images/conv_mixed_stacks_with_weighted_random_first_and_14th_anneal.png

Mixed stacks with random first and 2nd

./images/conv_mixed_stacks_with_random_first_and_2nd_anneal.png

Mixed stacks with weighted random first and 2nd

./images/conv_mixed_stacks_with_weighted_random_first_and_2nd_anneal.png

Global unhappiness when compared to categorical matching

The AI algorithm does not appear to always lead to an improved reduction in global/total unhappiness when compared to categorical matching. However I didn’t simulate for millions of iterations like HETI claims to. Calling on anyone with a fancy graphics card (or even a cryptocurrency mining rig) to try it out though. Bonus points if you can fix my code to implement CUDA optimisation.

Allocation modeAnneal methodCategorical method
All random5591012
Weighted random34522025
All stack68307208
Mixed stacks68217070
All same stack with random first71577231
All same stack with weighted random first66417117
All same stack with random first and 12th75737107
All same stack with weighted random first and 12th63267629
All same stack with random first and 14th68016997
All same stack with weighted random first and 14th63146602
All same stack with random first and 2nd68977188
All same stack with weighted random first and 2nd64528022
Mixed stacks with random first44793989
Mixed stacks with weighted random first42095475
Mixed stacks with random first and 12th41926111
Mixed stacks with weighted random first and 12th45605946
Mixed stacks with random first and 14th51804800
Mixed stacks with weighted random first and 14th48224528
Mixed stacks with random first and 2nd50675481
Mixed stacks with weighted random first and 2nd46185450

Discussion

  • In short, under each strategy, with weighting for random choices:
    1. All random
      • Gradual gradation of ranks from top to bottom
      • Nobody actually selects like this IRL (unless you’re a weirdo)
    2. All stack
      • It’s basically communism for internships.
      • You have a near-equal chance at landing just about every hospital.
      • Stack heterogeneity does not seem to change this overall effect.
    3. All stack but put a random on top
      • Slightly improves your chance of getting first preference, but otherwise probability of landing other hospitals is similar to when everyone stacks.
      • This appears to be most consistent with the strategy people use IRL.
    4. All stack but put a random at 1 and 12
      • Similar chances of getting your first, but strengthens chance at 12th.
      • Weakens both if stacks are heterogenous.
    5. All stack but put a random at 1 and 14
      • Similar shot at 14th but definitely worsens your first.
      • Better shot at 1st and worst at 14th if stacks are heterogenous.
    6. All stack but put a random at 1 and 2
      • Similar shot at 2nd, definitely worsens first.
      • Only slightly levels the chances at both if stacks are heterogenous.
  • Key differences from a categorical allocation method:
    • Wherever the stack is used, the near-equal chances of getting every hospital after your first (two) is preserved
    • If everyone selects randomly, less people get their first preference.
    • Strategy 3 perhaps represents the best idea - you are more likely to get your best, but otherwise you get an equal chance of getting everything else.
  • Counterintuitively, simulated annealing does not always result in a net increase in happiness, when compared to a categorical allocation approach. However, this may be an effect of low iteration count.
  • Regarding common rumours:
    • “The last 4 are the most important” - under this algorithm this is no longer true. If the matching system was categorical, it would be.
    • “Stacking hurts your chances of getting to preferences 1-6” (HETI, 2020) - definitely true but this seems to miss the point of stacking. The true advantage herein is that the chance of getting to a hospital now becomes proportional to the number of vacancies.

Limitations

  • Assumptions and deviations from reality have been addressed under Implementation.
    • Regarding DRA: it is possible to factor DRA into this model. The source files now include DRA counts from last year and include those values in Hospital.__init__(). Feel free to tinker around with the source code if you want to account for DRA, I just cbf to implement it atm. Also I’m unsure how much it will actually affect the conclusions of the simulation, the only real difference is that the number of spots changes. But basically the schema for the algorithm, as outlined in the 2019 Annual Report[fn:2] is this (document is unclear about what to do about the other DRA-eligible categories):
if cat1.count <= dra.spots:
	dra.spots.allocate(cat1)
else:
	dra.spots.allocate(random.select(cat1, dra.spots.count))
# ???how to account for other categories???
  • The exact parameters of the annealing process can affect the end result. Which ones HETI plans to use are unknown to us.
  • I only used two stack variants to demonstrate the effect of mixed stacks. It could be a lot worse if there are more.

What should you do?

  • There is no way to really draw any definitive conclusions on what the “best” strategy is, especially since a lot of simplifications were made to run this model.
  • For the moment, one might conclude that:
    1. Strategy 3 has been in use for the longest time and probably represents the most advantageous idea.
    2. Strategy 2 is best if you don’t care where you end up.
    3. It is unclear whether any other strategy will be advantageous in real life.
  • Fork me, submit a pull request or an issue on Github to help me improve the simulation so future generations can know what to do with greater accuracy. There’s probably a lot of higher-level math/CS knowledge that could be applied here that I don’t know about.

Future directions/todos

  • [ ] Fix the algorithm so it’s more consistent with the real data
  • [ ] GPU optimisation of simulated annealing
  • [ ] Significance analysis of results
  • [ ] Further strategic analysis of ways to “beat the algorithm”
  • [ ] Implement mixed strategies (data on rough proportioning of strategies among applicants is needed)
  • [ ] Try “mixed stacks” with >2 stack variants (how many stack variants actually exist in the wild?)
  • [ ] As the number of stack variants increases towards infinity, does the behaviour of the stack algorithm tend to approximate that of pure-random preferencing?
  • [ ] Implement random Category 1 rejections and multiple rounds of offers so this simulation actually becomes useful for Categories 2-6
  • [ ] Implement DRA pre-allocation
  • [ ] Implement all the other pathways

Sources

  • AMSA Internship Guide[fn:1] and HETI’s Annual Report[fn:2]
  • HETI’s 2021 procedure[fn:3] (thanks Chris Chiu)
  • 2019 Student Survey (available on my Github)

Footnotes

[fn:3] https://www.heti.nsw.gov.au/__data/assets/pdf_file/0011/576470/Optimised-Allocation-Pathway-Procedure-for-2021-Clinical-Year.pdf

[fn:2] https://www.heti.nsw.gov.au/__data/assets/pdf_file/0019/485002/Annual-Report-for-Medical-Graduate-Recruitment-for-the-2019-Clinical-Year.PDF

[fn:1] https://www.amsa.org.au/sites/amsa.org.au/files/Internship%20Guide%202019%20Final.pdf

About

Simulation of the HETI internship allocation algorithm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published