https://github.com/arosh/mm89
https://community.topcoder.com/longcontest/?module=ViewProblemStatement&rd=16494&compid=12525
https://github.com/arosh/mm89
Last synced: 8 months ago
JSON representation
https://community.topcoder.com/longcontest/?module=ViewProblemStatement&rd=16494&compid=12525
- Host: GitHub
- URL: https://github.com/arosh/mm89
- Owner: arosh
- Created: 2015-10-27T01:26:16.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-10-27T01:26:38.000Z (over 10 years ago)
- Last Synced: 2025-03-26T03:41:45.875Z (about 1 year ago)
- Language: C++
- Size: 133 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# How to run test
```
java MazeFixingVis -exec ./mm89 -seed 1 -debug -vis
```
# Memo
* border cellとは"RLUSE"のどれかに隣接する'.'のこと
* 評価関数に「指されているマスの数」を入れてみては?
* 到達可能なマスの数を最大化するような焼きなましをしてからパスを最大化する
* Followが遅い
* 既にF個変えてしまった時の処理
* 到達可能なマスを入れ替えたほうが効率が良い
* "A path can visit any cell only once, but different paths can visit same cell." なので,'S'でループになってもアウト
* せめてあと5倍は早くしよう
* Fを使い切れていない。Greedyに到達マスを増やしてから焼きなまし?
* 正確な評価難しいよね???高速化できなくね???
* 拡張風景をビジュアライズする
* 少ブロックに分割してそれぞれを焼きなまし?
* あるマスにある方向から入るとゴールにいけるかどうかを計算
* そのマスに来るためにはどのマスのどの方向から入る必要があるかを計算
* 焼きなましにすると既にF個変えてしまった時の処理がネックになっている
* Uは邪魔
# How to profile
```
export CPUPROFILE=pprof.out # ProfilerStartしているなら不要
java MazeFixingVis -exec ./mm89 -vis -debug -seed 2
google-pprof --callgrind mm89 pprof.out > pprof.callgrind 2> /dev/null && kcachegrind pprof.callgrind 2> /dev/null
```
```
java MazeFixingVis -exec "valgrind --tool=callgrind --callgrind-out-file=callgrind.out ./mm89" -vis -debug -seed 2
```
```
java MazeFixingVis -exec "perf record -o perf.data ./mm89" -vis -debug -seed 10
```
デフォルトで出力ファイル名はperf.dataだが、-oで指定しないと標準出力に変なものが増える
# References
* https://community.topcoder.com/longcontest/?module=ViewProblemStatement&rd=16494&compid=12525
* http://shindannin.hatenadiary.com/entry/20121224/1356364040
* https://github.com/arosh/arosh.github.com/wiki/Debug
* https://topcoder.g.hatena.ne.jp/CKomaki/20141202/1418158488