From: alexti <al...@sh...> - 2010-03-25 02:23:48
|
I am not sure how much effort UI part is in it, but backend stuff is trivial. I am always trimming graph before running route calculations (obviously removing disconnected edges and also eliminating "hanging edges" (the edge that can not be used to reach anything of non-zero value)). On Wed, 24 Mar 2010 11:20:22 -0600, Aliza Panitz <ali...@gm...> wrote: > This is something we could implement incrementally: > > (1) Have a button that users can click to highlight every bit of track > that their trains can reach from their tokens. This will be useful > even without route calculation, though it will require Rails to learn > about track, routes, tokens, etc. > > The algorithm I'm thinking of would be a simple flood-fill that gets > blocked by foreign tokens if the circles are filled. > > As a second stage it could limit itself to the length of the longest > train the company has, though the flood-fill is useful even with > imaginary infinite-length Diesels for showing where tokens can legally > be placed. > > (2) Once you have the flood-fill area, then it reduces to a smaller > map that can be worked with the tokenless algorithm described below. > > On Tue, Mar 23, 2010 at 8:52 PM, alexti <al...@sh...> wrote: >> Hi Stefan, >> >> I like your idea. It makes sense that artificially complicated track >> layout with lack of station markers in a simpler game may create more >> difficult problem than the realistic scenario in a more complex game >> will. >> >> If you are volunteering to create such setup for 1870 I can try to build >> similar scenario for 1856 (with couple of diesels, for example). In what >> form can you export such setup? Something simple (for example >> comma-separated tile ids) will do. I won't have time to do it until the >> weekend though... >> >> Alex. >> >> On Tue, 23 Mar 2010 16:35:52 -0600, Stefan Frey <ste...@we...> >> wrote: >> >>> Alex: >>> Some more comments on a potential test for automatic route calculation: >>> >>> I think there is no need for one of the more "exotic" types (18US, >>> 18C2C, >>> 1844) to create a (reasonable) difficult scenario. >>> >>> It is easy to create a quite involved track layout with maps and tiles >>> of one >>> of titles already implemented in Rails (for this even the partially >>> implemented 1835 or 1870 would work). >>> >>> Then rails could supply: >>> >>> * A map (here I mean the collection) with map hexes and tiles. From my >>> point >>> of view it is still open, how it is converted to the graph you need to >>> run >>> your algorithm. >>> >>> * The trains available to the one company could be easily changed. And >>> we can >>> make things more difficult by requesting scenarios, which are not >>> possible in >>> 1870: For example running a 8, 10 and 12 at once. >>> >>> * I think, that there is no need for tokens so far (either simply >>> assume >>> that >>> there are none (which would allow even more connections than usual) or >>> create >>> a network that is usually available to one company after considering >>> the >>> effects of tokening, if we want to built a more realistic test case). >>> >>> If no other wants to jump in, I would volunteer to create such a >>> network >>> on >>> the 1870 map. >>> >>> Stefan >>> >>> >>>> >>>> >> Perhaps it can be tested? There is no need to have complete support >>>> of >>>> >> such games in Rails to make experiment. We could create a graph >>>> >> representing "difficult case" and run algorithm on it. >>>> > >>>> > Yes, though it could take time to manually build the graph the way >>>> your >>>> > algorithm wants it. >>>> > >>>> >> > Some I would look at would be 18US, 18C2C (for sheer size and the >>>> >> >>>> >> ability >>>> >> >>>> >> > for a company to run lots of large trains), 1844 (which adds >>>> tunnels >>>> >> >>>> >> and >>>> >> >>>> >> > mountains that affect the route score), and 1860. >>>> >> >>>> >> Unfortunately, I don't own any of them :( >>>> > >>>> > The complete rules are available for at least 18US and 1844, and >>>> ps18xx >>>> > includes the map/tiles for all of them. >>>> >>>> Are there some cases you would consider examples of "difficult" ones >>>> that >>>> are available in some kind of format? From some PBEM games perhaps? It >>>> might be relatively easy to convert them into the graph I need. And >>>> it's >>>> difficult to get an impression of what realistic end game layout would >>>> be >>>> without playing the game. >>> >>> ------------------------------------------------------------------------------ >>> Download Intel® Parallel Studio Eval >>> Try the new software tools for yourself. Speed compiling, find bugs >>> proactively, and fine-tune applications for parallel performance. >>> See why Intel Parallel Studio got high marks during beta. >>> http://p.sf.net/sfu/intel-sw-dev >>> _______________________________________________ >>> Rails-devel mailing list >>> Rai...@li... >>> https://lists.sourceforge.net/lists/listinfo/rails-devel >> >> >> -- >> Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ >> >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> Rails-devel mailing list >> Rai...@li... >> https://lists.sourceforge.net/lists/listinfo/rails-devel >> > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ |