B. Perry
United States
Colorado Springs
Colorado
flag msg tools
Avatar
mbmbmbmbmb
Edit: I forgot the Complexity Factor feature

TradeGenie 1.2 has been released. You may download your own copy from www.kayvon.org. (The site is finicky--if you can't access it now, try again in 5 minutes.)

Several changes have been made:
* The Complexity Factor is diplayed when a list is run
* There is now a RandomChain algorithm for random-like results
* A verification code (digital signature) is placed on all results.
* The maximum entries has been increased to 500. Maximum wants is still 60.
* A dot is displayed for every 100,000 solutions checked
* Various (small) bug fixes, mostly affecting TradeGenie input


Complexity Factor
When a list is run, TradeGenie analyzes the list and assigns it a "Complexity Factor" value, which is an indication of how complicated the list is. Basically, the value should give an idea of the order of magnutide of processing required to fully analyze the list.

I haven't played around with this a lot, but I'm hoping it will one day give us an idea of how much time a list will take to fully process. One factor 4 list I tried completed in 1 second. One factor 9 list I tried completed in 55 seconds. I'd appreciate any feedback people can give me here. When you complete a list (TradeGenie stops running by itself because it's done), message me with the factor of the list and the amount of processing time TradeGenie reported.


RandomChain
The RandomChain algorithm is more or less a "guessing" algorithm used by Mikko's TradeResolver. I've tweaked it to run faster and, hopefully, more efficiently. I may yet tweak it again in the future.

This is the algorithm to run if you want to use TradeGenie on more than one computer. (I would recommend running it normally on the first and using RandomChain on all additional computers.) It will run endlessly until the user either stops it or forgets to pay his electric bill.


Verification Code
Someone mentioned the idea of adding a digital signature on and I thought it sounded like a neat idea. (Then I found out how long it would take to implement--ugh!) The verification code is kind of spiffy.

Every time you run TradeGenie, the results it saves are automatically assigned a verification code. When a math trade concludes, it is expected that moderators will post both the original want lists used in the trade and the results, complete with verification code.

Anyone with TradeGenie on their machine can save a copy of the wants list and a copy of the results to separate files on their own machine. Then, by running Tradegenie (TradeGenie -v wants.txt results.txt), they can verify the results.

Result verification checks several things. First, it makes sure that the results actually correspond to the want lists (the user names are the same and the solution is possible, given the wants on the list). Then it checks every entry on the solution list against the orignal want list and verifies that the entry order, solution, and all wants are exactly the way the were when TradeGenie first generated the results.

Verification prevents errors from occurring in the results, including mistakes with cut-and-paste onto the geek. It assures users that the want list they are given was, in fact, the same one used to generate the results. It also verifies that the results were not "fixed" in any way before they were posted.


TradeGenie and TradeResolver
Despite the improvements to TradeGenie, there are situations that better suit themselves to TradeResolver. TradeResolver (available at http://traderesolver.sourceforge.net) works on non-DOS (non-Windows-based) machines and offers some extra features not available in TradeGenie. It also permits a (virutally) limitless number of entries, whereas TradeGenie currently allows up to 500.

For everyday math trades, I would recommend TradeGenie for its sheer speed. (Displays a dot every 100,000 solutions checked instead of TradeResolver's every 10,000.) TradeGenie sifts through solutions much faster than TradeResolver. For unusual trades, including the multi-tier math trades, stick with TradeResolver. TradeResolver is also open source, so it's ideal for those interested in learning more detailed mechanics.


Bugs
I got rid of all the bugs before releasing this version, right? That's the idea, anyway. If you find anything strange, particularly with the new features, please send me a message and let me know.


TradeGenie is a huge time investment for me. My thanks goes out to the BGG community for supporting my efforts (and hobby). to my wife, who puts up with me spending days in front of the computer scratching my head about the latest problem, and to those that have tips me GG, showing me that my efforts are appreciated.


Happy Trading!
2 
 Thumb up
15.00
 tip
 Hide
  • [+] Dice rolls
Daniel Corban
Canada
Newmarket
Ontario
flag msg tools
badge
Avatar
mbmbmbmbmb
Do we have Dustin to thank for the verification feature? blush
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Mikko Saari
Finland
Tampere
flag msg tools
http://www.lautapeliopas.fi/ - the best Finnish board game resource!
badge
Avatar
mbmbmbmbmb
Actually, the latest TradeResolver prints dots every 1000 checked solutions... It's really that slow. So, I second the recommendation of using TradeGenie if you have a Windows machine and don't need any of the features TradeResolver has and Genie hasn't.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
B. Perry
United States
Colorado Springs
Colorado
flag msg tools
Avatar
mbmbmbmbmb
I forgot to mention the complexity factor feature. I'll edit my original posting to add that.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Jeff Michaud
United States
Longwood
Florida
flag msg tools
On-Line Want List Generator - Hopefully Making Math Trades a Little Bit Easier
badge
Captain Kirk, Captain Picard, Captain Sisko, Captain Janeway, Captain Archer
Avatar
mbmbmbmbmb
Kayvon wrote:
Several changes have been made:
* A dot is displayed for every 100,000 solutions checked
Would it be possible to add an option to have it not display the dots? (idealy I think it should be the default to not display them, and instead an option to display them, like the ftp "hash" option).

The problem with the dots is on long runs any "New best found: nn" that it spits out is scrolled off the screen

The display of the dots also isn't overly useful in that all it really indicates is that TradeGenie is indeed running . It's not a progress indicator, the "New best found" is a better indicator of progress.

I'm not sure if this is what it did before 1.2, but the output I'd like to (after the initial stats) is simply the "New best found: nn", and have them displayed on a new line (ie. output a linefeed afterwards). Ex:

New best found: 46
New best found: 48
New best found: 50


The only other thing I wouldn't mind seeing displayed is when TradeGenie finds another solution set that "matches" the current best found. This is simply a curiosity thing.

Thanks!

Jeff
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Jeff Michaud
United States
Longwood
Florida
flag msg tools
On-Line Want List Generator - Hopefully Making Math Trades a Little Bit Easier
badge
Captain Kirk, Captain Picard, Captain Sisko, Captain Janeway, Captain Archer
Avatar
mbmbmbmbmb
Small suggestion
Just a small suggestion/request...

On startup TradeGenie displays how many items it weeded the ilst down to, and the List Complexity Factor. And when it completes (or you interrupt it, ie. Control/C) it lets you know how long it had run for.

Could that info also be written out to the results file?

The weeded down to and complexity factor are fixed and can be easily regenerated or cut/pasted, so no biggy, just a nice thing for completeness.

However the time it took for it to find a particular result set is not as easy. If TradeGenie is kept running after finding the current "best found" then when you interrupt TradeGenie later on, you only know how long TradeGenie was run for, not how long it actually took to find the (best) results it last found.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
B. Perry
United States
Colorado Springs
Colorado
flag msg tools
Avatar
mbmbmbmbmb
Good suggestions. I'll probably incorporate some of them in the next release.

JeffyJeff wrote:
However the time it took for it to find a particular result set is not as easy.

Try looking at the timestamp on the results file. This is what I do, even while the program is running.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Jeff Michaud
United States
Longwood
Florida
flag msg tools
On-Line Want List Generator - Hopefully Making Math Trades a Little Bit Easier
badge
Captain Kirk, Captain Picard, Captain Sisko, Captain Janeway, Captain Archer
Avatar
mbmbmbmbmb
Adding comments to want lists?
Does TradeGenie recognize any comment format/syntax?

In my current math trade I added comments to the code to indicate which bgg user gave me a given batch of want lists (I used these to then verify each want lists was submitted by the correct person).

It was a simple format so to TradeGenie they each simply looked like an item with no wants.

However the problem I ran into is that these "comments" caused it to exceed 500 entries. I ended up having to pre-process the list to remove the comments before feeding it to TradeGenie

It would be nice if TradeGenie simply took any line that begins with a # (or a ; or whatever) and ignore it as if it were a blank line.

Thanks!

Jeff
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Mark Crane
United States
Orem
Utah
flag msg tools
badge
Avatar
mbmbmbmbmb
From another math trade discussion:

Quote:
It seems that people are paranoid of someone doing something with the results, but if it still ends with the maximum number of trades found, and it is a valid results file (based on the wantlist), then why does it matter?

The verification code keeps people from fudging the results, or manually finding combinations that, although satisfying everyone's wants, may not satisfy the highest quality of trades.

What happened in the past, with He Who Must Not Be Named, is that the moderator ran two trade algorithms, Genie and Resolver, and then cobbled together valid results from both so that he ended up with Power Grid. At least, that's what my understanding is. All of the trades were "valid" in the sense that everyone got something they wanted, but the moderator didn't clearly state up front that he was going to make a hybrid results file. He sort of mentioned it once then edited it out, and then wasn't forthcoming. As a result, someone else got hosed out of a valid trade, or several people did. During the two-day trade that I ran, one of my result sets gave me Game X +sweeteners, but the best result set just gave me GameX. I also mistakenly pasted my own game into my want list, which generated concern among one participant. One way to reduce the level of paranoia would be for moderators to not trade in their own trades.

Given how little people tip that sorta kills the motivation for running a trade, however. Also, when I ran my little trade, these abstract discussions about gaming the system and the veracity of results were really stressful, because I was afraid that one of the more "detail-oriented" participants would grab onto some minor detail and inflate it into world war III, thereby killling my credibility. In another recent trade, users submitted an incorrectly formatted want list, which resulted in the moderator having to ship out a game of his own or something similar, while the vultures circled, demanding justice and strict adherence to The Rules.

So, although I am admittedly paranoid, running a math trade scares me a little. In my opinion, the trade confirmation mechanism protects the moderator from the participants more than anything else.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
T M
United States
Longview
Texas
flag msg tools
badge
Avatar
mbmbmbmbmb
craniac wrote:
... As a result, someone else got hosed out of a valid trade, or several people did.
My point is, that if length of the results is public, it doesn't matter. The moderator has to take the longest one, instead of taking the longest one then cutting it down to his favor. It was my understanding that the unnamed moderator of the trade posted results that did not yield the "maximum" number of trades.


craniac wrote:
In my opinion, the trade confirmation mechanism protects the moderator from the participants more than anything else.
That is the best (and only substantial) argument I have heard in support of the verification code.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
B. Perry
United States
Colorado Springs
Colorado
flag msg tools
Avatar
mbmbmbmbmb
GameCloset wrote:
My point is, that if length of the results is public, it doesn't matter. The moderator has to take the longest one...

That's true, provided that the moderator is letting everyone "play along" at home and submit results. In the past, however, the moderator would do all the running on his own system. Wantlists were not typically released until after the trade had closed.

I like the "protect the moderator" argument, as well.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Jeff Michaud
United States
Longwood
Florida
flag msg tools
On-Line Want List Generator - Hopefully Making Math Trades a Little Bit Easier
badge
Captain Kirk, Captain Picard, Captain Sisko, Captain Janeway, Captain Archer
Avatar
mbmbmbmbmb
Increase MAXENTRIES?
Another suggestion...

Increase MAXENTRIES (which is currently 500).

In the current math trade we had to cut off additions to the geeklist about a day early because it had gone over 500.

Or... it would be cool if MAXENTRIES was "after weeding" the list down. In the math trade mentioned above, even though there were 509 items, TradeGenie weeded it down to 317. In theory we could have math trades with higher limits on the number of items, because we know it would very likely be weeded down to less than 500.

Thanks! -Jeff

ps: what does the "B" stand for as in "B. Perry"? Brian? Bob?
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Jeff Michaud
United States
Longwood
Florida
flag msg tools
On-Line Want List Generator - Hopefully Making Math Trades a Little Bit Easier
badge
Captain Kirk, Captain Picard, Captain Sisko, Captain Janeway, Captain Archer
Avatar
mbmbmbmbmb
No such entry found: nn ... supress duplicate warnings
While I'm making suggestions, here's another one

TradeGenie gives warnings about "No such entry found" on want lists. It's nice, but the duplicate warnings are not needed. Such as (from the current math trade), try running TradeGenie on the wants in http://activityclub.org/bgg/wants-nlmt2007.txt

Also if MAXENTRIES is exceeded, TradeGenie should exit out. I ran into the problem that I was exceeding MAXENTRIES and didn't know it (because it was scrolled off the screen by the No such entry found warnings), and was wondering why the Weeded down number didn't increase (and even went down) as I kept adding in more folks want lists to the master list.

Thanks again!

Jeff
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
B. Perry
United States
Colorado Springs
Colorado
flag msg tools
Avatar
mbmbmbmbmb
JeffyJeff wrote:
Or... it would be cool if MAXENTRIES was "after weeding" the list down.

Because of the way TradeGenie is written, this isn't plausible. It starts by allocating 500 memory slots for entries. In order to weed the list, it needs to load the entire list into memory. So, while I can probably make MAXENTRIES larger, I can't have it only count non-weeded entries.

Quote:
It would be nice if TradeGenie simply took any line that begins with a # (or a ; or whatever) and ignore it as if it were a blank line.

I've thought about that, actually, but I didn't think it would be useful. Tell me something, though. Do you make comments on lines by themselves or do you put comments on the end of lines with wants on them? If it's only lines by itself, I could use, say, '#' as the start character. That means, of course, that entry names cannot start with a pound character.

Quote:
I ran into the problem that I was exceeding MAXENTRIES and didn't know it (because it was scrolled off the screen by the No such entry found warnings)

Why did you have so many "no such entry" warnings? Would the comments feature fix this?
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Jeff Michaud
United States
Longwood
Florida
flag msg tools
On-Line Want List Generator - Hopefully Making Math Trades a Little Bit Easier
badge
Captain Kirk, Captain Picard, Captain Sisko, Captain Janeway, Captain Archer
Avatar
mbmbmbmbmb
Kayvon wrote:
So, while I can probably make MAXENTRIES larger, I can't have it only count non-weeded entries.
No problem, increasing (possibly doubling ) MAXENTRIES would go a long way in helping deal with large math trades (until math trades get even more popular )

Kayvon wrote:
Do you make comments on lines by themselves or do you put comments on the end of lines with wants on them? If it's only lines by itself, I could use, say, '#' as the start character. That means, of course, that entry names cannot start with a pound character.
Only a line by itself... and I think we can live with the start character restriction

Kayvon wrote:
Why did you have so many "no such entry" warnings? Would the comments feature fix this?
Missing want lists, especially with such a large trade, it could only take one missing want list of a highly wanted (ie. on lots of want lists) item. The comments feature wouldn't solve it as those aren't the ones that show up as (unless one was putting a comment in that had spaces in it such that TG thought they were wants).

I know some folks have put in an empty want list for missing want lists... however that would then make it alot harder to keep track of missing want lists (I use other tools against the same want lists file I give to TG), and other stats (I distinguish between a missing want list and an empty one).

Thanks again!

Jeff
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Jeff Michaud
United States
Longwood
Florida
flag msg tools
On-Line Want List Generator - Hopefully Making Math Trades a Little Bit Easier
badge
Captain Kirk, Captain Picard, Captain Sisko, Captain Janeway, Captain Archer
Avatar
mbmbmbmbmb
Cross compiling to Linux
From http://www.boardgamegeek.com/article/1284932#1284932
Kayvon wrote:
If anyone would like to lend me a cross-compiler, I'd be happy to compile a copy of TradeGenie for other platforms

See http://metamod-p.sourceforge.net/cross-compiling.on.windows....

I've installed Cygwin and then installed the cross cross compiler built to target Linux (on 32-bit Intel), and then I compiled a small test program under Windows XP then copied it to a Linux system and it ran.

I haven't looked to see if there's one to cross compile to the Mac (I don't have access to a Mac anyway to test the binary afterwards), but it does look like gcc exists on the Mac (see http://developer.apple.com/tools/), and assuming that's in the main gcc source code, it's definitely possible to build another version of gcc on Windows that will cross compile to the Mac... best info I could find is http://darkdust.net/marc/sega/m68k-cross-compiling.php
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Jeff Michaud
United States
Longwood
Florida
flag msg tools
On-Line Want List Generator - Hopefully Making Math Trades a Little Bit Easier
badge
Captain Kirk, Captain Picard, Captain Sisko, Captain Janeway, Captain Archer
Avatar
mbmbmbmbmb
I'd like to give my thanks to B. Perry for his contributions to math trades. His TradeGenie really made them easy and worthwhile.

As with anything in technology, the torch has been passed, and math trades have been solved (ie. finding the absolute max possible, and in seconds). See http://www.boardgamegeek.com/thread/193083

If it wasn't for TradeGenie it may never have progressed to this point.
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Andrew Swan
Australia
Randwick
NSW
flag msg tools
badge
Avatar
mbmbmbmbmb
I know that the web site is "finicky", but when I go to http://www.kayvon.org/, I get "Address Not Found - www.kayvon.org could not be found". This looks like a DNS problem rather than a site simply being down. Is there somewhere else from where I can download this software? Or does anyone have a copy they could post on BGG?
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
B. Perry
United States
Colorado Springs
Colorado
flag msg tools
Avatar
mbmbmbmbmb
I haven't renewed the website in the past year. TradeGenie has been replaced by TradeMaximizer. Check the wiki: http://www.boardgamegeek.com/wiki/page/TradeMaximizer#

If you're really interested in TradeGenie, just send me a PM with your email address and I can still send you a copy. But the superior algorithm of TradeMaximizer renders TradeGenie obsolete. It had a good run, though.
2 
 Thumb up
0.01
 tip
 Hide
  • [+] Dice rolls
Jeff Michaud
United States
Longwood
Florida
flag msg tools
On-Line Want List Generator - Hopefully Making Math Trades a Little Bit Easier
badge
Captain Kirk, Captain Picard, Captain Sisko, Captain Janeway, Captain Archer
Avatar
mbmbmbmbmb
game_boy wrote:
I get "Address Not Found - www.kayvon.org could not be found". This looks like a DNS problem rather than a site simply being down.
actually it looks like the domain name must have expired... long enough that it's actually available as a new registration.

Looks like B. Perry is still on BGG (last visit today)... send him a geekmail

Out of curiosity, what are you going to use TradeGenie for? Math trades have been "solved", see TradeMaximizer http://www.boardgamegeek.com/wiki/page/TradeMaximizer

edit: never mind, see B. Perry's response
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Andrew Swan
Australia
Randwick
NSW
flag msg tools
badge
Avatar
mbmbmbmbmb
JeffyJeff wrote:
Out of curiosity, what are you going to use TradeGenie for? Math trades have been "solved", see TradeMaximizer http://www.boardgamegeek.com/wiki/page/TradeMaximizer
I'm running my first maths trade and didn't know what tool to use. When I looked at the Wiki page (http://www.boardgamegeek.com/wiki/page/Math_Trades), the section on algorithms only listed these:

* TradeGenie 1.2 Released (Kayvon's TradeGenie),
* TradeResolver version 8 out! (msaari's TradeResolver),
* First release of GenetiTrade: version 0.1 (dyfrgi's GenetiTrade).

It was only after a lot more clicking and googling that I found out about TradeMaximizer, which I now intend to use. So you can ignore my question above, thanks anyway to all.
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Luis Botero
United States
Doral
Florida
flag msg tools
mbmbmbmbmb
the page www.kayvon.org is up for sale, you won't find the app
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls