]> git.scottworley.com Git - planeteer/log
planeteer
3 years agoRemove 'or any later version' license choice master
Scott Worley [Wed, 31 Mar 2021 19:39:11 +0000 (12:39 -0700)]
Remove 'or any later version' license choice

Recent drama about FSF leadership continuity makes this less clearly
desirable.

My intention is to add future license versions to this list after
verifying that they are of similar character and spirit to past
versions.

Previous versions of this software, of course, retain the 'or any later
version' license choice option.

10 years agoPrefer to not name return values
Scott Worley [Fri, 17 Jan 2014 07:05:30 +0000 (23:05 -0800)]
Prefer to not name return values

10 years agogofmt
Scott Worley [Thu, 7 Nov 2013 15:32:38 +0000 (07:32 -0800)]
gofmt

11 years agoA bunch more test cases.
Scott Worley [Wed, 19 Sep 2012 06:25:14 +0000 (23:25 -0700)]
A bunch more test cases.

11 years agoFix a legal-path-not-checked eden warp bug
Scott Worley [Mon, 17 Sep 2012 08:13:33 +0000 (01:13 -0700)]
Fix a legal-path-not-checked eden warp bug

You don't need to have a free cargo slot after warping if the hold is empty.

11 years agoMove the BeaconOn check out from the inner loop
Scott Worley [Mon, 17 Sep 2012 08:03:53 +0000 (01:03 -0700)]
Move the BeaconOn check out from the inner loop

There's no reason to check this more than once here.

11 years agoCorrect spelling
Scott Worley [Mon, 17 Sep 2012 07:18:30 +0000 (00:18 -0700)]
Correct spelling

11 years agoOnly print two significant figures for arms costs
Scott Worley [Mon, 17 Sep 2012 05:36:47 +0000 (22:36 -0700)]
Only print two significant figures for arms costs

11 years agoWrap and check accesses to p2i and c2i
Scott Worley [Mon, 17 Sep 2012 05:25:45 +0000 (22:25 -0700)]
Wrap and check accesses to p2i and c2i

This catches misspellings of planet and commodity names.  Otherwise,
they were defaulting (to Stockworld and nothing respectively).

11 years agoA simple whole-run testing methodology
Scott Worley [Sun, 16 Sep 2012 23:25:19 +0000 (16:25 -0700)]
A simple whole-run testing methodology

Add test.sh for comparing against historical recorded runs.

I have not done any extra analysis on cases recorded here.  Rather,
I just want to know when/if any of this output changes.

I couldn't figure out a good way to include these tests within the
"go test" framework.  The tricky bit was figuring out how to set
unmentioned flags back to their default values between runs.  I
deemed adding an 'option' object of some kind built from command
line flags but also buildable by tests to not be worth the complexity
at this time.

11 years agoGeneralize json-slurping
Scott Worley [Sat, 15 Sep 2012 20:19:46 +0000 (13:19 -0700)]
Generalize json-slurping

11 years agoMore named types: LogicalIndex
Scott Worley [Sat, 15 Sep 2012 19:53:07 +0000 (12:53 -0700)]
More named types: LogicalIndex

11 years agoMore named types: Value
Scott Worley [Sat, 15 Sep 2012 19:47:36 +0000 (12:47 -0700)]
More named types: Value

11 years agoStart using named types: PhysicalIndex
Scott Worley [Sat, 15 Sep 2012 19:38:31 +0000 (12:38 -0700)]
Start using named types: PhysicalIndex

11 years agoUpdate and clarify some comments
Scott Worley [Sat, 15 Sep 2012 19:34:45 +0000 (12:34 -0700)]
Update and clarify some comments

11 years agoAdd an extra_stats flag so they can be disabled
Scott Worley [Sat, 15 Sep 2012 19:09:01 +0000 (12:09 -0700)]
Add an extra_stats flag so they can be disabled

11 years agoMove the cost reporting out of main
Scott Worley [Fri, 22 Jun 2012 06:32:22 +0000 (23:32 -0700)]
Move the cost reporting out of main

11 years agoCost of --end
Scott Worley [Fri, 22 Jun 2012 04:51:42 +0000 (21:51 -0700)]
Cost of --end

11 years agoPrint visit costs with fixed width for vertical alignment.
Scott Worley [Thu, 21 Jun 2012 07:54:51 +0000 (00:54 -0700)]
Print visit costs with fixed width for vertical alignment.

11 years agoCalculate visit costs
Scott Worley [Thu, 21 Jun 2012 07:45:34 +0000 (00:45 -0700)]
Calculate visit costs

Also, add a test for Commas.  It was fine, but I got confused
after passing it a negative number.

11 years agoPrint total cost of fighters and shields
Scott Worley [Thu, 21 Jun 2012 07:01:48 +0000 (00:01 -0700)]
Print total cost of fighters and shields

11 years agoDisplay marginal benefit of using end_edens
Scott Worley [Thu, 21 Jun 2012 04:47:55 +0000 (21:47 -0700)]
Display marginal benefit of using end_edens

11 years agoFix test: Add trading dimension.
Scott Worley [Sun, 3 Jun 2012 11:09:18 +0000 (04:09 -0700)]
Fix test: Add trading dimension.

11 years agoUpdate for go v1
Scott Worley [Sun, 3 Jun 2012 04:02:04 +0000 (21:02 -0700)]
Update for go v1

12 years ago--tomorrow_weight feature, with data
Scott Worley [Sat, 3 Dec 2011 22:31:56 +0000 (14:31 -0800)]
--tomorrow_weight feature, with data

12 years agoAllow specifying a starting cargo
Scott Worley [Thu, 1 Dec 2011 15:34:51 +0000 (07:34 -0800)]
Allow specifying a starting cargo

12 years agoShow progress less frequently
Scott Worley [Wed, 30 Nov 2011 16:41:20 +0000 (08:41 -0800)]
Show progress less frequently

12 years agoNirvana's beacon is off by default, yes?
Scott Worley [Wed, 30 Nov 2011 16:40:53 +0000 (08:40 -0800)]
Nirvana's beacon is off by default, yes?

12 years agoDon't use 0 for uninitialized indexes
Scott Worley [Tue, 29 Nov 2011 15:31:20 +0000 (07:31 -0800)]
Don't use 0 for uninitialized indexes

0 is a valid index.  It can legitimately be the head of the optimal
path.  When it was the head of the optimal path, DescribePath() would
print nothing.  This fixes that bug.

12 years agoUI: Explain required usage when run without args
Scott Worley [Tue, 29 Nov 2011 15:30:32 +0000 (07:30 -0800)]
UI: Explain required usage when run without args

12 years agoFix sloppiness while considering private planets
Scott Worley [Tue, 29 Nov 2011 15:29:11 +0000 (07:29 -0800)]
Fix sloppiness while considering private planets

12 years agoObserved beacons in a game-in-progress of interest
Scott Worley [Sat, 26 Nov 2011 10:27:19 +0000 (02:27 -0800)]
Observed beacons in a game-in-progress of interest

TODO: Figure out the defaults and distribute that.

12 years agogofmt
Scott Worley [Sat, 26 Nov 2011 10:18:58 +0000 (02:18 -0800)]
gofmt

12 years agoFix one cargo unit short when eden jumping bug.
Scott Worley [Sat, 26 Nov 2011 10:13:38 +0000 (02:13 -0800)]
Fix one cargo unit short when eden jumping bug.

12 years agoFix (tighten) sanity check in EncodeIndex()
Scott Worley [Sat, 26 Nov 2011 10:03:09 +0000 (02:03 -0800)]
Fix (tighten) sanity check in EncodeIndex()

And fix the revealed bug when specifying --fuel=0

And add a sanity check for addr == other at the end of CellValue.

12 years agoExplicit -> implicit iteration.
Scott Worley [Sat, 26 Nov 2011 00:19:23 +0000 (16:19 -0800)]
Explicit -> implicit iteration.

This eliminates the whole class of bugs where the iteration order is
inconsistent with the data model.  It also simplifies the code by simply
removing the whole 9-nested-layers of for loops along with the barnacles
that were growing there (multiple passes for selling and then buying,
different iteration order depending on whether the planet sells Eden
warps, etc.)

The downside: Parallelism is lost.  This is now a single-threaded
program.

12 years agoConsider not using all the fuel.
Scott Worley [Thu, 24 Nov 2011 07:10:20 +0000 (23:10 -0800)]
Consider not using all the fuel.

12 years agoPrivate flag
Scott Worley [Thu, 24 Nov 2011 07:10:04 +0000 (23:10 -0800)]
Private flag

12 years agoPerformance!
Scott Worley [Fri, 11 Nov 2011 06:34:50 +0000 (22:34 -0800)]
Performance!

12 years agoImplement --visit
Scott Worley [Fri, 11 Nov 2011 06:09:34 +0000 (22:09 -0800)]
Implement --visit

12 years agoFollow the reverse energy gradient on Eden-selling worlds.
Scott Worley [Thu, 10 Nov 2011 05:24:39 +0000 (21:24 -0800)]
Follow the reverse energy gradient on Eden-selling worlds.

This fix is necessary to find the optimal strategy when Eden's
beacon is active.

12 years agoImplement --drones and --batteries.
Scott Worley [Sun, 6 Nov 2011 06:10:44 +0000 (23:10 -0700)]
Implement --drones and --batteries.

12 years agoConsistent hyper-jump terminology.
Scott Worley [Sun, 6 Nov 2011 05:09:35 +0000 (22:09 -0700)]
Consistent hyper-jump terminology.

12 years agoUsing an eden warp doesn't give you cargo.
Scott Worley [Fri, 4 Nov 2011 00:54:53 +0000 (17:54 -0700)]
Using an eden warp doesn't give you cargo.

12 years agoImplement Eden buying
Scott Worley [Fri, 4 Nov 2011 00:32:25 +0000 (17:32 -0700)]
Implement Eden buying

12 years agoMore action descriptions
Scott Worley [Thu, 3 Nov 2011 23:23:16 +0000 (16:23 -0700)]
More action descriptions

Print raw address change when a nice description is unavailable.

12 years agoImplement --end
Scott Worley [Thu, 3 Nov 2011 23:20:33 +0000 (16:20 -0700)]
Implement --end

12 years agoDon't eden warp to planets that sell eden warp units.
Scott Worley [Thu, 3 Nov 2011 23:12:34 +0000 (16:12 -0700)]
Don't eden warp to planets that sell eden warp units.

The Codex forbids this.

Also, only use one eden warp unit at a time.

12 years agoOnly warp to planets with their beacons on.
Scott Worley [Thu, 3 Nov 2011 23:10:48 +0000 (16:10 -0700)]
Only warp to planets with their beacons on.

12 years agoRead --end into a map
Scott Worley [Thu, 3 Nov 2011 23:09:13 +0000 (16:09 -0700)]
Read --end into a map

12 years agoFix flight plan logic (destination, not origin)
Scott Worley [Thu, 3 Nov 2011 21:58:27 +0000 (14:58 -0700)]
Fix flight plan logic (destination, not origin)

12 years agoFix --cloak
Scott Worley [Thu, 3 Nov 2011 21:34:50 +0000 (14:34 -0700)]
Fix --cloak

12 years agoBuy from the right cell (no UnusedCargo when empty)
Scott Worley [Thu, 3 Nov 2011 20:56:46 +0000 (13:56 -0700)]
Buy from the right cell (no UnusedCargo when empty)

12 years agoStart working on --cloak.
Scott Worley [Thu, 3 Nov 2011 00:12:13 +0000 (17:12 -0700)]
Start working on --cloak.

12 years agoFix bug: account for the empty hold
Scott Worley [Wed, 2 Nov 2011 23:43:24 +0000 (16:43 -0700)]
Fix bug: account for the empty hold

12 years agoPrint large numbers with commas
Scott Worley [Wed, 2 Nov 2011 23:00:43 +0000 (16:00 -0700)]
Print large numbers with commas

Get the right stuff on stdout vs stderr

12 years agoRelative prices from the data file are percentages
Scott Worley [Wed, 2 Nov 2011 22:32:10 +0000 (15:32 -0700)]
Relative prices from the data file are percentages

Divide them by 100 before using them.

12 years agoDescribePath()
Scott Worley [Wed, 2 Nov 2011 18:19:39 +0000 (11:19 -0700)]
DescribePath()

12 years agoFindBestState().
Scott Worley [Wed, 2 Nov 2011 17:41:05 +0000 (10:41 -0700)]
FindBestState().

This can now emit an answer.  It is a factor 80x off in a simple
test.  :)

12 years agoMore haphazard development of untried code.
Scott Worley [Tue, 1 Nov 2011 22:55:27 +0000 (15:55 -0700)]
More haphazard development of untried code.

12 years agoMore haphazard development
Scott Worley [Thu, 27 Oct 2011 05:37:32 +0000 (22:37 -0700)]
More haphazard development

Fix StateTableSize().

Fix visits and flight_plan to be [] instead of [""] when not specified.

Add some sanity checking in EncodeIndex().

Move table allocation out of FillStateTable1() so that it can be run
through FillStateTable1() multiple times for verification.

More documentation/thoughts on state table size.

Add an empty InitializeStateTable() to remind me to do that.

Start poking at FillStateTableCell().  This approach won't work.
FillStateTable2() cannot just process one cell completely and then move
onto the next.  Some types of processing (eg: arriving, selling) have to
be performed to all the cells before the next round of actions (buying).

12 years agoNotes on FillStateTableCell()
Scott Worley [Wed, 26 Oct 2011 06:31:07 +0000 (23:31 -0700)]
Notes on FillStateTableCell()

12 years agogofmt
Scott Worley [Wed, 26 Oct 2011 05:46:37 +0000 (22:46 -0700)]
gofmt

12 years agoFillStateTable()
Scott Worley [Wed, 26 Oct 2011 05:45:45 +0000 (22:45 -0700)]
FillStateTable()

12 years agoSome safety against future modifications in DimensionSizes().
Scott Worley [Wed, 26 Oct 2011 04:12:26 +0000 (21:12 -0700)]
Some safety against future modifications in DimensionSizes().

12 years agoMake DimensionSizes() more resilient against dimension reordering.
Scott Worley [Wed, 26 Oct 2011 02:21:16 +0000 (19:21 -0700)]
Make DimensionSizes() more resilient against dimension reordering.

12 years agoTweak flags
Scott Worley [Tue, 25 Oct 2011 07:36:12 +0000 (00:36 -0700)]
Tweak flags

12 years agogofmt
Scott Worley [Tue, 25 Oct 2011 07:27:28 +0000 (00:27 -0700)]
gofmt

12 years agoAdd a lot of code that isn't exercised yet.
Scott Worley [Tue, 25 Oct 2011 07:22:40 +0000 (00:22 -0700)]
Add a lot of code that isn't exercised yet.

12 years agoIndex commodities by their name.
Scott Worley [Mon, 24 Oct 2011 14:57:12 +0000 (07:57 -0700)]
Index commodities by their name.

Also, use initial_funds and max_quantity in TradeValue()

12 years agoUse pointers more and indexes less
Scott Worley [Mon, 24 Oct 2011 07:52:10 +0000 (00:52 -0700)]
Use pointers more and indexes less

12 years agoFindBestTrades()
Scott Worley [Mon, 24 Oct 2011 07:45:08 +0000 (00:45 -0700)]
FindBestTrades()

12 years agoConvert local prices to a flat map
Scott Worley [Mon, 24 Oct 2011 07:01:36 +0000 (00:01 -0700)]
Convert local prices to a flat map

12 years agoPlaneteer 2: Data and data loading.
Scott Worley [Mon, 24 Oct 2011 05:59:13 +0000 (22:59 -0700)]
Planeteer 2: Data and data loading.