Rafbill_pc (@Rafbill_pc) profile picture
Joined December 2023
Photo by Rafbill_pc (@Rafbill_pc)Photo by Rafbill_pc (@Rafbill_pc)Photo by Rafbill_pc (@Rafbill_pc)Photo by Rafbill_pc (@Rafbill_pc)Photo by Rafbill_pc (@Rafbill_pc)Photo by Rafbill_pc (@Rafbill_pc)Photo by Rafbill_pc (@Rafbill_pc)Photo by Rafbill_pc (@Rafbill_pc)Photo by Rafbill_pc (@Rafbill_pc)Photo by Rafbill_pc (@Rafbill_pc)
#AHC074 I achieved a score corresponding to an average of ~12.0 moves per item (I did not think of pairing sheets...) I noticed that the shape 1 01 001 000 with N+1 sheets seemed optimal (can this be proven?) if the items were unknown.
2
2
29
2,113
The idea is that from the starting configuration, every item can be reached by moving ~N/4 sheets up (the number of times "01" appears in the target). By not moving the sheets back down eagerly, we save moves compared to the ~N/2 baseline solution, achieving ~0.354*N.
1
1
291
Then I added some of the known items to 127 new sheets, and to the previously unused parts of the 65 base sheets. The allocation is determined by min-cost max-flow. The permutation and parity of the N windows are optimized using SA.
2
262
#AHC_GenAI2026 My solution uses beam search. The main component to the heuristic function is the sum of distances from each package to its destination. The distances take into account the movement of the dice. (See init_dists in my code).
1
21
917
416 moves on seed0.
1
1
199
For fun, I tried to use a huge beam width on seed0, and got 382 moves.
3
169
#AHC070 2nd place \o/ I used beam search. The evaluation function is (sum of d_t for the processed cells) + (sum of 0.9993^t d_t for the remaining cells). The three vectors are chosen randomly, making sure that all cells are reachable.
1
5
1
52
6,279
To ensure diversity, at most 1 state is kept for every position. I wanted to add a postprocessing step that would try to swap adjacent moves, but didn't have time to implement it during the contest.
4
408
I got 3rd place in #AHC066 I didn't have any great insights for this problem, my solution is similar to other solutions at the top (except for @mochi_pako 's 1st place beam search). In the end, my solution has three stages:
1
1
45
3,542
I see that other participants used SXS, but I feel that SX should be stronger on average (but SXS is probably better in some cases, so allowing all four of X, SX, XS and SXS would probably be an improvement).
1
3
1,340
3) At the end, I try to improve the best solutions found. If a set of allowed macros and an ordering of the calls are fixed, and the turn limit is ignored, the problem becomes just a shortest path in a rather large graph. I consider the set of all prefixes of X and SX for this.
1
1,132
#AHC064 I notice that I have never explained my solution that is currently 1st in the extended standings. It is a beam search similar to the writer (@yunix91201367 ) 's solution, but I optimized the evaluation function using the same methods as github.com/Rafbillpc/BaltosP…
1
1
19
2,103
#AHC064 I got 22 steps on seed=3.
1
12
48
4,469
#AHC064 Thank you for the contest. I finished in 2nd place🎉 34 moves on seed=1:
1
7
64
2,998
For a given state, children states are generated by an inner beam search: for every (i,j), keep the best W states whose last moves involved upper track i and lower track j.
1
1
3
1,003
The beam width for the outer search is 25, the beam width for the inner search is 4 (which means that the inner search looks at 400 intermediate states).
1
539