Author |
Message |
RajuAbju
Warrant Officer
Joined: Thu Jan 31, 2002 3:00 am Posts: 96 Location: USA
|
 Fig & Shield Prices
I'm trying to figure out how to determine fig and shield pricing. there was a website which had the formula, but its no longer working apparently. And I've gone through old posts here, but I cant seem to find any information on what the cheapest price for figs is. Is this something that is constant (as in, "X" price, no matter what game, is always the cheapest figs will ever be) or does the lowest price for figs vary from game to game?
Same for shields I guess. I want to know how much, and when, the best deal on shields is for a given game.
_________________ "Freedom is not free, but the U.S. Marine Corps will pay most of your share." -Ned Dolan "Tolerance is the virtue of a man without convictions." -GK Chesterton
|
Sun Nov 30, 2008 9:22 pm |
|
 |
ElderProphet
Commander
Joined: Tue Oct 07, 2003 2:00 am Posts: 1132 Location: Augusta, GA
|
 Re: Fig & Shield Prices
Fig and shield pricing is a constant for a given date, so will be the same on all servers with the same date. At least, I know of no tedit option to change them. Fig pricing ranges from 160 to 240 credits. Shield pricing ranges from 190 to 110. Fig price + shield price on a given day always add to 350 (~349). Pricing follows a sine function, repeating *approximately* every 87.5 days. I scripted this a while back, and according to what I wrote then... # My formula for Fig Price is 40*sin(2Pi/87.5*DAYS)+200, where Pi = 3.14, and DAYS is days since 4/23/2008. That is not the exact formula, and diverges somewhat over time. I believe the actual formula has never been cracked, though I think on it often. It's one of the last great logic problems in TW for me (since I wrote a single-pass bubble search anyway)  +EP+
_________________ Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.
|
Sun Nov 30, 2008 10:15 pm |
|
 |
Mad Mick
1st Sergeant
Joined: Wed Jan 16, 2008 3:40 pm Posts: 39 Location: Ireland
|
 Re: Fig & Shield Prices
Would it be more accurate if more decimal places were used for pi? You have probably tried that already. Kav
|
Mon Dec 01, 2008 9:02 am |
|
 |
ElderProphet
Commander
Joined: Tue Oct 07, 2003 2:00 am Posts: 1132 Location: Augusta, GA
|
 Re: Fig & Shield Prices
Kav, I should have known this would pique your interest. We should get together on ICQ and work out a solution.
But to answer your question, yes, I've considered a higher precision for Pi.
_________________ Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.
|
Mon Dec 01, 2008 11:22 am |
|
 |
Desert Fox
Lieutenant J.G.
Joined: Fri Sep 12, 2003 2:00 am Posts: 352 Location: USA
|
 Re: Fig & Shield Prices
RajuAbju wrote: I'm trying to figure out how to determine fig and shield pricing. there was a website which had the formula, but its no longer working apparently. And I've gone through old posts here, but I cant seem to find any information on what the cheapest price for figs is. Is this something that is constant (as in, "X" price, no matter what game, is always the cheapest figs will ever be) or does the lowest price for figs vary from game to game?
Same for shields I guess. I want to know how much, and when, the best deal on shields is for a given game. The best way i found is to go to http://www.grimytrader.com/UnderGroundTools.cfm under fig price estimates. works like a charm.
_________________ It's a game. Have fun! Desert Fox / Tommy Gunn Member of Phoenix Rising
|
Mon Dec 01, 2008 8:57 pm |
|
 |
Mad Mick
1st Sergeant
Joined: Wed Jan 16, 2008 3:40 pm Posts: 39 Location: Ireland
|
 Re: Fig & Shield Prices
ElderProphet wrote: Kav, I should have known this would pique your interest. We should get together on ICQ and work out a solution.
But to answer your question, yes, I've considered a higher precision for Pi. I dont have a connection at home, and dont use icq at work. I'm the Chief Bottlewasher, but thats worse than being a grunt, I cant let the troops see me goofing around online. There is a probability that your formula is in fact correct. People tend to assume theoretical infinite accuracy using computers to evaluate mathematical expressions. The actual calculated result, however,depends on the limited accuracy of real-life processors, and on the algorithm used, which can vary from language to language. This might be the cause of the divergence. Kav
|
Tue Dec 02, 2008 5:20 am |
|
 |
Singularity
Veteran Op
Joined: Thu Jun 02, 2005 2:00 am Posts: 5558 Location: USA
|
 Re: Fig & Shield Prices
Hehe. Isn't that CK's formula? The one where he says something like "Don't ask me how, I'm just that good..." ? http://en.wikipedia.org/wiki/Least_squares
_________________ May the unholy fires of corbomite ignite deep within the depths of your soul...
1. TWGS server @ twgs.navhaz.com 2. The NavHaz Junction - Tradewars 2002 Scripts, Resources and Downloads 3. Open IRC chat @ irc.freenode.net:6667 #twchan 4. Parrothead wrote: Jesus wouldn't Subspace Crawl.
*** SG memorial donations via paypal to: dpocky68@booinc.com
|
Tue Dec 02, 2008 9:23 am |
|
 |
ElderProphet
Commander
Joined: Tue Oct 07, 2003 2:00 am Posts: 1132 Location: Augusta, GA
|
 Re: Fig & Shield Prices
Heh, that was one of CK's endearing moments for me. It was something like, "Don't ask me how I arrived at those numbers, I'm just that good, heh."
But no, that is not CK's formula. I could dig his up though, I'm sure. RammaR's formula on GrimyTrader is based on CK's.
Thanks Kav, I'm pretty sure that mine is not the real deal. It just doesn't feel Gary Martin-ish enough. Close though.
_________________ Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.
|
Tue Dec 02, 2008 6:56 pm |
|
 |
ElderProphet
Commander
Joined: Tue Oct 07, 2003 2:00 am Posts: 1132 Location: Augusta, GA
|
 Re: Fig & Shield Prices
After many (read: MANY!) hours of research, I've found the zero day used as the basis for calculating hold/fig/shield pricing. Hopefully the other pieces will click into place over the next few days (read: weeks) and I'll be able to post the real formula.
My, how bored the guys at work will be when I try to explain what I've done.
+EP+
_________________ Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.
|
Mon Dec 08, 2008 12:47 am |
|
 |
Singularity
Veteran Op
Joined: Thu Jun 02, 2005 2:00 am Posts: 5558 Location: USA
|
 Re: Fig & Shield Prices
LOL
At this point wouldn't it just be easier to... I dunno, take a debugger and map the assembler code for it? If I wasn't so dang lazy...
_________________ May the unholy fires of corbomite ignite deep within the depths of your soul...
1. TWGS server @ twgs.navhaz.com 2. The NavHaz Junction - Tradewars 2002 Scripts, Resources and Downloads 3. Open IRC chat @ irc.freenode.net:6667 #twchan 4. Parrothead wrote: Jesus wouldn't Subspace Crawl.
*** SG memorial donations via paypal to: dpocky68@booinc.com
|
Mon Dec 08, 2008 1:20 am |
|
 |
Mad Mick
1st Sergeant
Joined: Wed Jan 16, 2008 3:40 pm Posts: 39 Location: Ireland
|
 Re: Fig & Shield Prices
ElderProphet wrote: After many (read: MANY!) hours of research, I've found the zero day used as the basis for calculating hold/fig/shield pricing. Hopefully the other pieces will click into place over the next few days (read: weeks) and I'll be able to post the real formula.
My, how bored the guys at work will be when I try to explain what I've done.
+EP+ The date has been known since the 17th century. Archbishop Ussher calculated the date of creation as Oct 23rd 4004 BC; using this gives accurate fig & shield prices for eternity. Shame on you, and you a Prophet  EDIT: http://en.wikipedia.org/wiki/Ussher_chronologyKav
|
Mon Dec 08, 2008 4:55 am |
|
 |
ElderProphet
Commander
Joined: Tue Oct 07, 2003 2:00 am Posts: 1132 Location: Augusta, GA
|
 Re: Fig & Shield Prices
Yes Sing, I've considered debugging, but understand that this is a labor of love. It's less about finding the answer, and more about figuring out the answer, mathematically. Kav, Gary Martin must not have known that  +EP+
_________________ Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.
|
Mon Dec 08, 2008 10:40 am |
|
 |
ElderProphet
Commander
Joined: Tue Oct 07, 2003 2:00 am Posts: 1132 Location: Augusta, GA
|
 Re: Fig & Shield Prices
Solved. I'm going to do a bit more regression testing, but I *THINK* I have them solved exactly, proven to the sub-second, for the Holds sine function, and the Figs/Shields cosine function. Wow, my formula above is SO close, except for the zero day of course. The reason these were so hard to solve is because of the fake numbers used for Pi.
I'll post the final formulas after I've slept on it, and tested a bit more.
+EP+
_________________ Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.
|
Tue Dec 09, 2008 1:11 am |
|
 |
RajuAbju
Warrant Officer
Joined: Thu Jan 31, 2002 3:00 am Posts: 96 Location: USA
|
 Re: Fig & Shield Prices
Well, I will take some minor amount of credit for bringing this age old mystery back into the spotlight 
_________________ "Freedom is not free, but the U.S. Marine Corps will pay most of your share." -Ned Dolan "Tolerance is the virtue of a man without convictions." -GK Chesterton
|
Tue Dec 09, 2008 9:49 am |
|
 |
ElderProphet
Commander
Joined: Tue Oct 07, 2003 2:00 am Posts: 1132 Location: Augusta, GA
|
 Re: Fig & Shield Prices
NOTE: This has been superseded, see the post here: http://classictw.com/viewtopic.php?p=246347#p246347Okay, so about those formulas... In the formulas below, X is NOW - 32142. NOW is the number of days, including the fractional part, since 00:00:00 on Dec 31, 1900. 32142 is equivalent to 00:00:00 on Dec 31, 1987 (or 1999 in-game). The sine is calculated with X as a radian measurement. The prices are always truncated for the display, but the real price includes the fractional part. You will be charged this hidden fractional amount. First up is the Holds price. Review Traitor's formulas for calculating the cost for holds. The first hold cost (B in Traitor's formula) is calculated as follows: First Hold = 200 + 50 * Sin(X * 2Pi / 17.5), where Pi = 3.14146.And now for the important one, the Fig Price: Fig Price = 200 + 40 * Cos(X * 2Pi / 87.5), where Pi = 3.13999.And last but not least, Shield Price: Shield Price = 150 - 40 * Cos(X * 2Pi / 87.5), where Pi = 3.13999.In Excel: Hold1: =200+50*SIN((NOW()-32142)*2*3.14146/17.5) Fig: =200+40*COS((NOW()-32142)*2*3.13999/87.5) Shield: =150-40*COS((NOW()-32142)*2*3.13999/87.5)I'll post the scripts on Grimy in a few days. I've attached an Excel spreadsheet to this post, that forecasts prices for 70 days from NOW, which will update each time you load it. A pic of the chart is below. Regards, +EP+ Attachment:
EP_HFS_Chart.jpg [ 40.28 KiB | Viewed 18910 times ]
_________________ Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.
|
Thu Dec 11, 2008 11:49 pm |
|
 |
|
Who is online |
Users browsing this forum: No registered users and 2 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|