Author

Topic: NXT :: descendant of Bitcoin - Updated Information - page 615. (Read 2761629 times)

legendary
Activity: 1512
Merit: 1004
Is it safe to unlock account and forge on public node? Even that this node is my personal?

It's not recommended.

http://wiki.nxtcrypto.org/wiki/FAQ#Are_there_public_servers_I_can_use_for_forging.3F
So is it safe to unlock acc and forge with my PC?
Another,is it safe to send Nxt with conneting some public nodes(I dont know whether they are public or not)?
have the same concern with coloredcoin,anyone give some explanation?
TKS.
hero member
Activity: 798
Merit: 500
This 2000 post thrad is madness...please consider to CLOSE IT, with a last message like "go to forum nxccrypto" or something like that.

There is no reason to do so.
sr. member
Activity: 476
Merit: 500
The two top 50M accounts!! What is their deal? Why are they not sharing their wealth or participating in the progress of their investment. I mean if we consider that the account No. 3 and No. 4 are DGEX and BTER that means they have almost double amount of coins compared to account No. 5 which has about 29M. That is a huge difference. Honestly I would be really ashamed if I was them and I am sure these two 50M amounts are poke in the eye to any new investor that looks our distribution just like they are poking my eye.

Heck, to start at least get your accounts under 50M so they are in the 40s or divide this 50M into two accounts of 25M, it will definitely look better for newcomers.
I really don't understand this!!

The #1 holder seems stingy with his NXT, but the 2nd one seems to be doing much more interactions with other accounts.

At this point maybe they are waiting for more volume to do anything with their NXT. They can't sell even half without it being considered a HUGE dump on any of the exchanges. IMO the same effect as when a major stock holder in a corporation tries to "cash out" will happen in this case, meaning a HUGE drop in price will occur. At least it shows they believe in NXT enough to not dump NXT into oblivion.

Also...Satoshi owns 1M of the 21M BitCoins ever to be created...so...yeah  Smiley. I have a feeling BCNext owns at least one of the top 20'ish accounts since he invested 1 BTC too during the beginning phase. I wish Litecoin or Bitcoin's blockchain explorer would show the top accounts for each, just think how BAD those would be lol  Tongue...

Compared to early on when NXT was just getting started, the amount of accounts with less than 10M in the top accounts has dramatically increased. So NXT is getting there if anything
full member
Activity: 350
Merit: 100
NXTinfrastructurefund -- there are only 4 candidates? No one has stepped up for the fifth spot?
full member
Activity: 350
Merit: 100
This 2000 post thrad is madness...please consider to CLOSE IT, with a last message like "go to forum nxccrypto" or something like that.

No. Nostalgie de la boue. It's messy and fine just like it is. You organized neat freaks can admire your manicured threads over at nxtcrypto Tongue
legendary
Activity: 952
Merit: 1000
Yeah! I hate ShroomsKit!
The two top 50M accounts!! What is their deal? Why are they not sharing their wealth or participating in the progress of their investment. I mean if we consider that the account No. 3 and No. 4 are DGEX and BTER that means they have almost double amount of coins compared to account No. 5 which has about 29M. That is a huge difference. Honestly I would be really ashamed if I was them and I am sure these two 50M amounts are poke in the eye to any new investor that looks our distribution just like they are poking my eye.

Heck, to start at least get your accounts under 50M so they are in the 40s or divide this 50M into two accounts of 25M, it will definitely look better for newcomers.
I really don't understand this!!

+ 1
full member
Activity: 238
Merit: 100
The two top 50M accounts!! What is their deal? Why are they not sharing their wealth or participating in the progress of their investment. I mean if we consider that the account No. 3 and No. 4 are DGEX and BTER that means they have almost double amount of coins compared to account No. 5 which has about 29M. That is a huge difference. Honestly I would be really ashamed if I was them and I am sure these two 50M amounts are poke in the eye to any new investor that looks our distribution just like they are poking my eye.

Heck, to start at least get your accounts under 50M so they are in the 40s or divide this 50M into two accounts of 25M, it will definitely look better for newcomers.
I really don't understand this!!
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
I edited the code and added a constant, c_combined_percent, to determine the proportion of accounts in collusion.  Assuming all nodes are limited to 1% forge power over a ten year period and a ninety percent collusion rate, I'm getting a combined best streak of 151, 137 and 136 from three runs.

That's really not too bad either - less than the time it takes to watch a LOTR film to be able to safely buy a house or other big investment even if 90% of the forging power is trying to secretly forge a replacement blockchain!
sr. member
Activity: 644
Merit: 250
I'm trying to simulate TF using Ian's program if we limit all accounts to a 1% forge balance.  Using 100 accounts holding 1% of the currency over a ten year period, I'm getting a combined best streak of ~23.  This is combining the first 50 accounts.  (These are the accounts assumed to be under the same control.)

That's not too bad at all really - it basically gives us a rough idea that for huge transfer amounts (where you might be concerned with such a possible attack) you would want to require 30+ confirmations (around half the time of the average 6 confirmations for Bitcoin).

You might also want to experiment with different amounts of collusion (there should be a constant in the code that is used to determine the proportion of that).


I edited the code and added a constant, c_combined_percent, to determine the proportion of accounts in collusion.  Assuming all nodes are limited to 1% forge power over a ten year period and a ninety percent collusion rate, I'm getting a combined best streak of 151, 137 and 136 from three runs.

Compare this to allowing an unlimited amount of forging power per account.  If you assign ninety-one percent of the currency to one account and run the test over a ten year period, the account with 91% of the currency gets best streak of 468, 419, 415.  These streaks are three times longer than if you limit accounts to 1% forging power.

Code:
// Copyright (c) 2014 CIYAM Developers
//
// Distributed under the MIT/X11 software license, please refer to the file license.txt
// in the root project directory or http://www.opensource.org/licenses/mit-license.php.

#include
#include
#include

#include
#include
#include
#include

//#define NUM_DAYS 1
#define NUM_YEARS 10

#define PENALISE_HIGHER_STAKE
//#define PREVENT_IMMEDIATE_REPEAT

//#define SHOW_WINNERS
//#define SHOW_WINNERS_WEIGHT

using namespace std;

const int c_combined_proportion = 10;

#ifndef NUM_YEARS
const size_t c_num_blocks = 1440 * NUM_DAYS;
#else
const size_t c_num_blocks = 1440 * 365 * NUM_YEARS;
#endif

int main( )
{
#ifdef SHOW_WINNERS
   string winners;
#endif
   vector< int > wins;
   vector< int > streaks;
   vector< int > balances;
   vector< int > penalised;
   vector< int > penalising;
   vector< int > best_streak;

   vector< int > combined;
   vector< long > weights;

   long total_balance = 0;

   int combined_streak = 0;
   int best_combined_streak = 0;

   for(int a=0;a<9;a++){
   balances.push_back( 1 );
   }
   balances.push_back(91);

   srand( ( unsigned int )time( 0 ) );

   for( size_t i = 0; i < balances.size( ); i++ )
   {
      total_balance += balances[ i ];

      wins.push_back( 0 );
      weights.push_back( 0 );
      streaks.push_back( 0 );
      combined.push_back( 0 );
      penalised.push_back( 0 );
      penalising.push_back( 0 );
      best_streak.push_back( 0 );
   }

   size_t last_winner = 0;
   for( size_t blocks = 0; blocks < c_num_blocks; blocks++ )
   {
      long total_weight = 0;
      for( size_t i = 0; i < weights.size( ); i++ )
      {
         if( penalising[ i ] )
         {
            --penalising[ i ];
            weights[ i ] = 0;
         }
         else
         {
            int divisor = rand( ) % 10;

            if( divisor == 0 )
               ++divisor;

            weights[ i ] = ( rand( ) % 10000 ) * ( balances[ i ] / divisor );

            if( weights[ i ] == 0 )
               ++weights[ i ];

            total_weight += weights[ i ];
         }
      }

      if( total_weight == 0 )
         ++total_weight;

      size_t winner = 0;
      size_t runner_up = 0;
      long best_target = 0;
      long second_best_target = 0;

      for( size_t i = 0; i < balances.size( ); i++ )
      {
         long adjusted_weight = weights[ i ] * 1000 / total_weight;

         if( adjusted_weight > best_target )
         {
            winner = i;
            best_target = adjusted_weight;
         }
         else if( adjusted_weight > second_best_target )
         {
            runner_up = i;
            second_best_target = adjusted_weight;
         }
      }

#ifdef PENALISE_HIGHER_STAKE
      if( best_target == 350 ) // an above median value
      {
         ++penalised[ winner ];
         penalising[ winner ] = 1440;
      }
#endif

#ifdef PREVENT_IMMEDIATE_REPEAT
      if( winner == last_winner )
         winner = runner_up;
#endif

#ifdef SHOW_WINNERS
      winners += ( char )( 'a' + winner );
#  ifdef SHOW_WINNERS_WEIGHT
      ostringstream osstr;
      osstr << best_target;
      winners += "(" + osstr.str( ) + ")";
#  endif
#endif
      ++wins[ winner ];

      if( winner < balances.size( ) / c_combined_proportion )
      {
         ++combined_streak;
         if( combined_streak > best_combined_streak )
            best_combined_streak = combined_streak;
      }
      else
         combined_streak = 0;

      if( winner == last_winner )
      {
         ++streaks[ winner ];
         if( streaks[ winner ] > best_streak[ winner ] )
            best_streak[ winner ] = streaks[ winner ];
      }
      else
         streaks[ winner ] = 0;

      last_winner = winner;
   }

   cout << "blocks = " << c_num_blocks << endl;

   for( size_t i = 0; i < balances.size( ); i++ )
      cout << ( char )( 'a' + i ) << " = " << balances[ i ] << endl;

#ifdef SHOW_WINNERS
   cout << winners << endl;
#endif
   for( size_t i = 0; i < wins.size( ); i++ )
      cout << "wins( " << ( char )( 'a' + i ) << " ) = " << wins[ i ] << endl;

#ifdef PENALISE_HIGHER_STAKE
   for( size_t i = 0; i < penalised.size( ); i++ )
      cout << "penalised( " << ( char )( 'a' + i ) << " ) = " << penalised[ i ] << endl;
#endif

   for( size_t i = 0; i < best_streak.size( ); i++ )
      cout << "best_streak( " << ( char )( 'a' + i ) << " ) = " << ( best_streak[ i ] + 1 ) << endl;

   cout << "best_combined_streak = " << best_combined_streak << endl;
   cout << "(combined the first " << ( balances.size( ) / c_combined_proportion ) << " accounts)" << endl;
   cout << balances.size() << endl;
}
sr. member
Activity: 311
Merit: 250
This 2000 post thrad is madness...please consider to CLOSE IT, with a last message like "go to forum nxccrypto" or something like that.
sr. member
Activity: 644
Merit: 250
I'm trying to simulate TF using Ian's program if we limit all accounts to a 1% forge balance.  Using 100 accounts holding 1% of the currency over a ten year period, I'm getting a combined best streak of ~23.  This is combining the first 50 accounts.  (These are the accounts assumed to be under the same control.)

That's not too bad at all really - it basically gives us a rough idea that for huge transfer amounts (where you might be concerned with such a possible attack) you would want to require 30+ confirmations (around half the time of the average 6 confirmations for Bitcoin).

You might also want to experiment with different amounts of collusion (there should be a constant in the code that is used to determine the proportion of that).


I edited the code and added a constant, c_combined_percent, to determine the proportion of accounts in collusion.  Assuming all nodes are limited to 1% forge power over a ten year period and a ninety percent collusion rate, I'm getting a combined best streak of 151, 137 and 136 from three runs.

Code:
// Copyright (c) 2014 CIYAM Developers
//
// Distributed under the MIT/X11 software license, please refer to the file license.txt
// in the root project directory or http://www.opensource.org/licenses/mit-license.php.

#include
#include
#include

#include
#include
#include
#include

//#define NUM_DAYS 1
#define NUM_YEARS 10

#define PENALISE_HIGHER_STAKE
//#define PREVENT_IMMEDIATE_REPEAT

//#define SHOW_WINNERS
//#define SHOW_WINNERS_WEIGHT

using namespace std;

const int c_combined_proportion = 10;
const double c_combined_percent = 90;

#ifndef NUM_YEARS
const size_t c_num_blocks = 1440 * NUM_DAYS;
#else
const size_t c_num_blocks = 1440 * 365 * NUM_YEARS;
#endif

int main( )
{
#ifdef SHOW_WINNERS
   string winners;
#endif
   vector< int > wins;
   vector< int > streaks;
   vector< int > balances;
   vector< int > penalised;
   vector< int > penalising;
   vector< int > best_streak;

   vector< int > combined;
   vector< long > weights;

   long total_balance = 0;

   int combined_streak = 0;
   int best_combined_streak = 0;

   for(int a=0;a<100;a++){
   balances.push_back( 1 );
   }

   srand( ( unsigned int )time( 0 ) );

   for( size_t i = 0; i < balances.size( ); i++ )
   {
      total_balance += balances[ i ];

      wins.push_back( 0 );
      weights.push_back( 0 );
      streaks.push_back( 0 );
      combined.push_back( 0 );
      penalised.push_back( 0 );
      penalising.push_back( 0 );
      best_streak.push_back( 0 );
   }

   size_t last_winner = 0;
   for( size_t blocks = 0; blocks < c_num_blocks; blocks++ )
   {
      long total_weight = 0;
      for( size_t i = 0; i < weights.size( ); i++ )
      {
         if( penalising[ i ] )
         {
            --penalising[ i ];
            weights[ i ] = 0;
         }
         else
         {
            int divisor = rand( ) % 10;

            if( divisor == 0 )
               ++divisor;

            weights[ i ] = ( rand( ) % 10000 ) * ( balances[ i ] / divisor );

            if( weights[ i ] == 0 )
               ++weights[ i ];

            total_weight += weights[ i ];
         }
      }

      if( total_weight == 0 )
         ++total_weight;

      size_t winner = 0;
      size_t runner_up = 0;
      long best_target = 0;
      long second_best_target = 0;

      for( size_t i = 0; i < balances.size( ); i++ )
      {
         long adjusted_weight = weights[ i ] * 1000 / total_weight;

         if( adjusted_weight > best_target )
         {
            winner = i;
            best_target = adjusted_weight;
         }
         else if( adjusted_weight > second_best_target )
         {
            runner_up = i;
            second_best_target = adjusted_weight;
         }
      }

#ifdef PENALISE_HIGHER_STAKE
      if( best_target == 350 ) // an above median value
      {
         ++penalised[ winner ];
         penalising[ winner ] = 1440;
      }
#endif

#ifdef PREVENT_IMMEDIATE_REPEAT
      if( winner == last_winner )
         winner = runner_up;
#endif

#ifdef SHOW_WINNERS
      winners += ( char )( 'a' + winner );
#  ifdef SHOW_WINNERS_WEIGHT
      ostringstream osstr;
      osstr << best_target;
      winners += "(" + osstr.str( ) + ")";
#  endif
#endif
      ++wins[ winner ];

      if( winner < (int)((double)balances.size( ) * c_combined_percent / 100.0) )
      {
         ++combined_streak;
         if( combined_streak > best_combined_streak )
            best_combined_streak = combined_streak;
      }
      else
         combined_streak = 0;

      if( winner == last_winner )
      {
         ++streaks[ winner ];
         if( streaks[ winner ] > best_streak[ winner ] )
            best_streak[ winner ] = streaks[ winner ];
      }
      else
         streaks[ winner ] = 0;

      last_winner = winner;
   }

   cout << "blocks = " << c_num_blocks << endl;

   for( size_t i = 0; i < balances.size( ); i++ )
      cout << ( char )( 'a' + i ) << " = " << balances[ i ] << endl;

#ifdef SHOW_WINNERS
   cout << winners << endl;
#endif
   for( size_t i = 0; i < wins.size( ); i++ )
      cout << "wins( " << ( char )( 'a' + i ) << " ) = " << wins[ i ] << endl;

#ifdef PENALISE_HIGHER_STAKE
   for( size_t i = 0; i < penalised.size( ); i++ )
      cout << "penalised( " << ( char )( 'a' + i ) << " ) = " << penalised[ i ] << endl;
#endif

   for( size_t i = 0; i < best_streak.size( ); i++ )
      cout << "best_streak( " << ( char )( 'a' + i ) << " ) = " << ( best_streak[ i ] + 1 ) << endl;

   cout << "best_combined_streak = " << best_combined_streak << endl;
   cout << "(combined the first " << ( (double)balances.size( ) * c_combined_percent / 100.0 ) << " accounts)" << endl;
   cout << balances.size() << endl;
}

sr. member
Activity: 476
Merit: 500
did you try all the different board themes with nxtcrypto?
Maybe I'll look for it and'll try it someday. I like use things "as is" very often.

well if you ever decide to and have an account there.

Its https://forums.nxtcrypto.org/ucp.php -> "Board Preferences" -> "My board style:" -> Then just look through the 5 different styles available.
sr. member
Activity: 364
Merit: 250
☕ NXT-4BTE-8Y4K-CDS2-6TB82
When the test is completed AE? Roll Eyes

When we are confident that it is secure?
sr. member
Activity: 364
Merit: 250
☕ NXT-4BTE-8Y4K-CDS2-6TB82
Any luck with the decentralized exchange? Seems like a hot buzz word across the crypto community, but not much content.

We are testing it.
full member
Activity: 162
Merit: 100
hehe
When the test is completed AE? Roll Eyes
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
I'm trying to simulate TF using Ian's program if we limit all accounts to a 1% forge balance.  Using 100 accounts holding 1% of the currency over a ten year period, I'm getting a combined best streak of ~23.  This is combining the first 50 accounts.  (These are the accounts assumed to be under the same control.)

That's not too bad at all really - it basically gives us a rough idea that for huge transfer amounts (where you might be concerned with such a possible attack) you would want to require 30+ confirmations (around half the time of the average 6 confirmations for Bitcoin).

You might also want to experiment with different amounts of collusion (there should be a constant in the code that is used to determine the proportion of that).
legendary
Activity: 1092
Merit: 1010
did you try all the different board themes with nxtcrypto?
Maybe I'll look for it and'll try it someday. I like use things "as is" very often.

Please try out the "prosilver" theme at least, before making a judgement.

It is SO much better and will probably be a mind-changer Smiley
hero member
Activity: 644
Merit: 500
did you try all the different board themes with nxtcrypto?
Maybe I'll look for it and'll try it someday. I like use things "as is" very often.
sr. member
Activity: 364
Merit: 250
☕ NXT-4BTE-8Y4K-CDS2-6TB82
Just a reminder: BCNext don't want NXT to be a currency. Coins on top of Nxt should be. Does this change anything?

Does this change anything regarding instant confirmation discussion?

No.
sr. member
Activity: 644
Merit: 250
I'm trying to simulate TF using Ian's program if we limit all accounts to a 1% forge balance.  Using 100 accounts holding 1% of the currency over a ten year period, I'm getting a combined best streak of ~23.  This is combining the first 50 accounts.  (These are the accounts assumed to be under the same control.)

Code:
// Copyright (c) 2014 CIYAM Developers
//
// Distributed under the MIT/X11 software license, please refer to the file license.txt
// in the root project directory or http://www.opensource.org/licenses/mit-license.php.

#include
#include
#include

#include
#include
#include
#include

//#define NUM_DAYS 1
#define NUM_YEARS 10

#define PENALISE_HIGHER_STAKE
//#define PREVENT_IMMEDIATE_REPEAT

//#define SHOW_WINNERS
//#define SHOW_WINNERS_WEIGHT

using namespace std;

const int c_combined_proportion = 2;

#ifndef NUM_YEARS
const size_t c_num_blocks = 1440 * NUM_DAYS;
#else
const size_t c_num_blocks = 1440 * 365 * NUM_YEARS;
#endif

int main( )
{
#ifdef SHOW_WINNERS
   string winners;
#endif
   vector< int > wins;
   vector< int > streaks;
   vector< int > balances;
   vector< int > penalised;
   vector< int > penalising;
   vector< int > best_streak;

   vector< int > combined;
   vector< long > weights;

   long total_balance = 0;

   int combined_streak = 0;
   int best_combined_streak = 0;

   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );
   balances.push_back( 1 );

   srand( ( unsigned int )time( 0 ) );

   for( size_t i = 0; i < balances.size( ); i++ )
   {
      total_balance += balances[ i ];

      wins.push_back( 0 );
      weights.push_back( 0 );
      streaks.push_back( 0 );
      combined.push_back( 0 );
      penalised.push_back( 0 );
      penalising.push_back( 0 );
      best_streak.push_back( 0 );
   }

   size_t last_winner = 0;
   for( size_t blocks = 0; blocks < c_num_blocks; blocks++ )
   {
      long total_weight = 0;
      for( size_t i = 0; i < weights.size( ); i++ )
      {
         if( penalising[ i ] )
         {
            --penalising[ i ];
            weights[ i ] = 0;
         }
         else
         {
            int divisor = rand( ) % 10;

            if( divisor == 0 )
               ++divisor;

            weights[ i ] = ( rand( ) % 10000 ) * ( balances[ i ] / divisor );

            if( weights[ i ] == 0 )
               ++weights[ i ];

            total_weight += weights[ i ];
         }
      }

      if( total_weight == 0 )
         ++total_weight;

      size_t winner = 0;
      size_t runner_up = 0;
      long best_target = 0;
      long second_best_target = 0;

      for( size_t i = 0; i < balances.size( ); i++ )
      {
         long adjusted_weight = weights[ i ] * 1000 / total_weight;

         if( adjusted_weight > best_target )
         {
            winner = i;
            best_target = adjusted_weight;
         }
         else if( adjusted_weight > second_best_target )
         {
            runner_up = i;
            second_best_target = adjusted_weight;
         }
      }

#ifdef PENALISE_HIGHER_STAKE
      if( best_target == 350 ) // an above median value
      {
         ++penalised[ winner ];
         penalising[ winner ] = 1440;
      }
#endif

#ifdef PREVENT_IMMEDIATE_REPEAT
      if( winner == last_winner )
         winner = runner_up;
#endif

#ifdef SHOW_WINNERS
      winners += ( char )( 'a' + winner );
#  ifdef SHOW_WINNERS_WEIGHT
      ostringstream osstr;
      osstr << best_target;
      winners += "(" + osstr.str( ) + ")";
#  endif
#endif
      ++wins[ winner ];

      if( winner < balances.size( ) / c_combined_proportion )
      {
         ++combined_streak;
         if( combined_streak > best_combined_streak )
            best_combined_streak = combined_streak;
      }
      else
         combined_streak = 0;

      if( winner == last_winner )
      {
         ++streaks[ winner ];
         if( streaks[ winner ] > best_streak[ winner ] )
            best_streak[ winner ] = streaks[ winner ];
      }
      else
         streaks[ winner ] = 0;

      last_winner = winner;
   }

   cout << "blocks = " << c_num_blocks << endl;

   for( size_t i = 0; i < balances.size( ); i++ )
      cout << ( char )( 'a' + i ) << " = " << balances[ i ] << endl;

#ifdef SHOW_WINNERS
   cout << winners << endl;
#endif
   for( size_t i = 0; i < wins.size( ); i++ )
      cout << "wins( " << ( char )( 'a' + i ) << " ) = " << wins[ i ] << endl;

#ifdef PENALISE_HIGHER_STAKE
   for( size_t i = 0; i < penalised.size( ); i++ )
      cout << "penalised( " << ( char )( 'a' + i ) << " ) = " << penalised[ i ] << endl;
#endif

   for( size_t i = 0; i < best_streak.size( ); i++ )
      cout << "best_streak( " << ( char )( 'a' + i ) << " ) = " << ( best_streak[ i ] + 1 ) << endl;

   cout << "best_combined_streak = " << best_combined_streak << endl;
   cout << "(combined the first " << ( balances.size( ) / c_combined_proportion ) << " accounts)" << endl;
   cout << balances.size() << endl;
}
Jump to: