{"id":24835953,"url":"https://github.com/arosh/mm89","last_synced_at":"2025-10-07T06:53:05.617Z","repository":{"id":141679446,"uuid":"45008846","full_name":"arosh/MM89","owner":"arosh","description":"https://community.topcoder.com/longcontest/?module=ViewProblemStatement\u0026rd=16494\u0026compid=12525","archived":false,"fork":false,"pushed_at":"2015-10-27T01:26:38.000Z","size":136,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T03:41:45.875Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arosh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-27T01:26:16.000Z","updated_at":"2015-10-27T01:26:39.000Z","dependencies_parsed_at":"2023-03-13T14:42:39.720Z","dependency_job_id":null,"html_url":"https://github.com/arosh/MM89","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/arosh/MM89","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arosh%2FMM89","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arosh%2FMM89/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arosh%2FMM89/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arosh%2FMM89/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arosh","download_url":"https://codeload.github.com/arosh/MM89/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arosh%2FMM89/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278734407,"owners_count":26036404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-31T04:59:57.027Z","updated_at":"2025-10-07T06:53:05.590Z","avatar_url":"https://github.com/arosh.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# How to run test\n\n```\njava MazeFixingVis -exec ./mm89 -seed 1 -debug -vis\n```\n\n# Memo\n\n* border cellとは\"RLUSE\"のどれかに隣接する'.'のこと\n* 評価関数に「指されているマスの数」を入れてみては？\n* 到達可能なマスの数を最大化するような焼きなましをしてからパスを最大化する\n* Followが遅い\n* 既にF個変えてしまった時の処理\n* 到達可能なマスを入れ替えたほうが効率が良い\n* \"A path can visit any cell only once, but different paths can visit same cell.\" なので，'S'でループになってもアウト\n* せめてあと5倍は早くしよう\n* Fを使い切れていない。Greedyに到達マスを増やしてから焼きなまし？\n* 正確な評価難しいよね？？？高速化できなくね？？？\n* 拡張風景をビジュアライズする\n* 少ブロックに分割してそれぞれを焼きなまし？\n* あるマスにある方向から入るとゴールにいけるかどうかを計算\n* そのマスに来るためにはどのマスのどの方向から入る必要があるかを計算\n* 焼きなましにすると既にF個変えてしまった時の処理がネックになっている\n* Uは邪魔\n\n# How to profile\n\n```\nexport CPUPROFILE=pprof.out # ProfilerStartしているなら不要\njava MazeFixingVis -exec ./mm89 -vis -debug -seed 2\ngoogle-pprof --callgrind mm89 pprof.out \u003e pprof.callgrind 2\u003e /dev/null \u0026\u0026 kcachegrind pprof.callgrind 2\u003e /dev/null\n```\n\n```\njava MazeFixingVis -exec \"valgrind --tool=callgrind --callgrind-out-file=callgrind.out ./mm89\" -vis -debug -seed 2\n```\n\n```\njava MazeFixingVis -exec \"perf record -o perf.data ./mm89\" -vis -debug -seed 10\n```\n\nデフォルトで出力ファイル名はperf.dataだが、-oで指定しないと標準出力に変なものが増える\n\n# References\n\n* https://community.topcoder.com/longcontest/?module=ViewProblemStatement\u0026rd=16494\u0026compid=12525\n* http://shindannin.hatenadiary.com/entry/20121224/1356364040\n* https://github.com/arosh/arosh.github.com/wiki/Debug\n* https://topcoder.g.hatena.ne.jp/CKomaki/20141202/1418158488\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farosh%2Fmm89","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farosh%2Fmm89","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farosh%2Fmm89/lists"}