From: Stefan F. <ste...@we...> - 2010-03-21 17:06:03
|
You are right: as I draw my (mental) picture I implicitly added the restriction that after a move in the inner circle you have to move out. Somehow similar to the inner circle in Titan ;-) Then again you have an additional restriction to maintain. But I am simply guessing here and if his algorithm is working, Alex will have a solution, which he is the best to explain. STefan > > [EV] How do you prevent backtracking in this case? Going 2-8-10-12-6? > > -----Original Message----- > From: Stefan Frey [mailto:ste...@we...] > - I prefer your definition of the graph to the one in tiles.xml (inherited > from the tiledesigner) as you only have to count edges and you do not have > to > consider that you are not allowed to visit the same side (a node/vertex in > Rails) twice. Rails defines tile 25 (the green Y) with two edges that both > start from the same side (see tiles.xml), but only one of each edge can be > used per revenue turn. > > [EV] I would rather think that the current Rails Tile definition would be > easier to use, as the only two requirements to make it work are: > - each edge (and station) may be visited only once, > - return from an edge is never allowed. > See my question above: it seems harder to do with the extra vertexes, as it > doen't seem to be clear what would prevent going 8-12-10. Or is that > somehow built into the vertex #7-12 properties? > > Erik. > > > --------------------------------------------------------------------------- >--- 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 |
From: Dave M. <da...@mi...> - 2010-03-24 18:06:21
|
<html><HEAD><LINK rel=stylesheet type=text/css href="/webmail/static/deg/css/wysiwyg-3451203449.css" media=all> <META name=GENERATOR content="MSHTML 8.00.6001.18882"></HEAD> <BODY> <DIV>I've built this code in my VB 1830 game years ago.</DIV> <DIV> </DIV> <DIV>You have to solve a lot of the problems to get this far, and the information can be use to validate tile lays.</DIV> <DIV>Is that hex reachable? What tiles can I use? In what rotations? Does the track connect? (permissive or strict upgrade rules?)</DIV> <DIV> </DIV> <DIV>There are many track connectivity, token location (look out for XX tiles), and tile drawing issues to conquer just getting this much done.</DIV> <DIV>But I did it with a simple iteration and evaluation stack to flatten the recursion problem.</DIV> <DIV>(push the tokens; pop a location, mark connected edges; push edges it connects to that is new, repeat)</DIV> <DIV> </DIV> <DIV>Without an route suggestor; you can then build a simple "connect the dots" route interface that lets you point at a route on the map, it color's the connecting track, and total's the revenue for you. Do it in a list for multiple trains. That's as far as I got. The interface was buggy as heck, most due to using lousy route list structures.</DIV> <DIV> </DIV> <DIV>Even with a route suggestor, the UI will get "interesting".</DIV> <DIV> </DIV> <DIV>Dave.</DIV> <DIV><BR><BR>Mar 24, 2010 01:25:51 PM, <A class="parsedEmail parsedEmail" href="mailto:rai...@li..." target=_blank>rai...@li...</A> wrote:<BR></DIV> <BLOCKQUOTE style="BORDER-LEFT: rgb(102,153,204) 3px solid">On Wed, Mar 24, 2010 at 10:20 AM, Aliza Panitz <<A class="parsedEmail parsedEmail parsedEmail" href="mailto:ali...@gm..." target=_blank>ali...@gm...</A>> wrote:<BR>> This is something we could implement incrementally:<BR>><BR>> (1) Have a button that users can click to highlight every bit of track<BR>> that their trains can reach from their tokens. This will be useful<BR>> even without route calculation, though it will require Rails to learn<BR>> about track, routes, tokens, etc.<BR>><BR>> The algorithm I'm thinking of would be a simple flood-fill that gets<BR>> blocked by foreign tokens if the circles are filled.<BR><BR><BR>I agree. This is a great starting point.<BR><BR>It provides useful information to players almost immediately, even<BR>before route calculation is feature complete.<BR><BR>---Brett.<BR><BR>------------------------------------------------------------------------------<BR>Download Intel® Parallel Studio Eval<BR>Try the new software tools for yourself. Speed compiling, find bugs<BR>proactively, and fine-tune applications for parallel performance.<BR>See why Intel Parallel Studio got high marks during beta.<BR><A class=parsedLink href="http://p.sf.net/sfu/intel-sw-dev" target=_blank>http://p.sf.net/sfu/intel-sw-dev</A><BR>_______________________________________________<BR>Rails-devel mailing list<BR><A class="parsedEmail parsedEmail parsedEmail" href="mailto:Rai...@li..." target=_blank>Rai...@li...</A><BR><A class=parsedLink href="http://https://lists.sourceforge.net/lists/listinfo/rails-devel" target=_blank>https://lists.sourceforge.net/lists/listinfo/rails-devel</A><BR></BLOCKQUOTE></BODY></html> |
From: alexti <al...@sh...> - 2010-03-25 02:40:08
|
I guess I have side-stepped a lot of issues by doing all that logic on the graph rather than on the board description. Though the question of what tile can be used for upgrade is not solvable automatically - in some games specific upgrades are not permitted, even all the normal requirements are satisfied. And in other games strange "upgrades" are permitted (like replacing yellow town with yellow straight or curve in 1856). This has to be a part of the game's tile manifest. On Wed, 24 Mar 2010 12:06:11 -0600, Dave Mitton <da...@mi...> wrote: > I've built this code in my VB 1830 game years ago. > > You have to solve a lot of the problems to get this far, and the > information can > be use to validate tile lays. > > Is that hex reachable? What tiles can I use? In what rotations? Does the > track > connect? (permissive or strict upgrade rules?) > > There are many track connectivity, token location (look out for XX > tiles), and > tile drawing issues to conquer just getting this much done. > > But I did it with a simple iteration and evaluation stack to flatten the > recursion problem. > > (push the tokens; pop a location, mark connected edges; push edges it > connects > to that is new, repeat) > > Without an route suggestor; you can then build a simple "connect the > dots" route > interface that lets you point at a route on the map, it color's the > connecting > track, and total's the revenue for you. Do it in a list for multiple > trains. > That's as far as I got. The interface was buggy as heck, most due to > using lousy > route list structures. > > Even with a route suggestor, the UI will get "interesting". > > Dave. > > > > Mar 24, 2010 01:25:51 PM, rai...@li... wrote: > > On Wed, Mar 24, 2010 at 10:20 AM, 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. > > > I agree. This is a great starting point. > > It provides useful information to players almost immediately, even > before route calculation is feature complete. > > ---Brett. > > ------------------------------------------------------------------------------ > 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/ |