Using blockchain "mining" to drive AI


After the recent discussions about SingularityNet and the pairing of blockchain and AI, an interesting thought occurred to me. The concept of “mining” could potentially be applied to generating the computing power to drive a “selective breeding” strategy.

The idea would be that the miners would be part of a network that is running an algorithm to generate and score mutations in the AI implementation. When a mutation results in a verifiable improvement to an AI’s overall intelligence, that would generate a new block with some newly minted coins as a reward. This would help solve one problem that I have with my current long-term project, which is how to pump more computing power into the system to speed up the evolution process without breaking the bank.

Unfortunately I don’t have a lot of experience with blockchain technology myself, so I may need to reach out to some other developers with the right skills when my project gets far enough along.


Mining bit coins already consumes vast amounts of electricity around the world, if would be great if some more tangible goal could also be included such as Folding at Home:

There was an idea put forward that if great open source hardware CPU designs where developed then the cost of compute would fall dramatically. The high end chip you currently pay $4,000 or $5,000 for in reality only cost $5 to $10 to physically manufacture.


Agreed. I am currently mining because the profitability is through the roof and can’t be ignored (at current demand, I am earning more from it than my real job). But the amount of electricity and processing power that I am burning just to hash random values is a real concern. If all that power could be solving useful problems at the same time, I wouldn’t feel nearly as guilty…


I did a little bit of digging, and the properties needed for a mining algorithm to be an effective “proof of work” are:

  1. Solutions are difficult to find
  2. Solutions are easy to verify once found

Assuming the system generates a series of tests or challenges that can be used to score an AI’s level of intelligence, I think both properties could be met. Special attention would need to be given to any possible attack vector whereby a human could inject the answers rather than allowing the AI to generate answers.

Off topic, but I am intrigued by the Folding at Home idea, though. Do you know if there are relatively rare outputs of that algorithm which could be considered as “solutions”? (they don’t necessarily have to be useful in and of themselves, just rarely occurring and difficult to find)


Ok, think I have a potential strategy for a “proof of work” algorithm that relies on Folding at Home. I know this is getting off topic, but the interest in a cryptocurrency that does this is surprisingly high, so I should be able to use that interest to help build out the essential elements of a blockchain that I can eventually use for my AI project.

Background details…

So the way Folding@home works, is that you install a client on your computer (builds are available for the major OS’s). This client software is closed source, however it is headless and interfaced via one of the separate UIs which are open source.

Folding@home can be configured to have one or more “slots”, which can be set to the CPU or available GPUs. These slots process elements of a work unit in parallel, and results are sent back to the server. The username and optional passkey do not appear to be associated with any type of formal account, but simply are fields used for attribution. Credentials for attribution are stored unencrypted in a config file read by the client, and can be easily changed by simply modifying the config file.

An API is available, which includes an endpoint to look up statistics by user. Multiple clients or different people can reuse the same credentials, and will appear in the statistics as the same user. Results in the statistics for the same username with different passcodes will be separated as different records (with the same username) in the results, and the passcode is not included in the results.

Proof of Work Strategy…

One possible strategy would be for each miner to install the mining software and Folding@home client on their computer (may also be possible to bundle the binary with the mining software… would need to investigate). The mining software node would start by generating a random username and passkey and updating the config file, then launching the Folding@home client to begin work. It would then ping the statistics API for the generated username until it returns statistics, and then hash the JSON string. If the hash has some rare properties (for example, if it starts with four zeros), then the node would stop the Folding@home client, generate a new random username and passcode, and restart the client.

The mining software would then generate a new block to be verified by other nodes in the network. The details for verification would include the username and the hash. Clients would verify the block by retrieving statistics for the username from the API, hashing them, and verifying the hash is correct. In the case of duplicate usernames in the API results, then each result would be checked. If any of the results hash correctly, the work is verified. Since a passkey was specified and not shared, this would make it impossible for a rogue node to invalidate a block by processing additional work units onto the record.

This strategy isn’t complete, as there is an obvious attack vector – a rogue node could just troll and hash the statistics to find good hashes without actually doing any work itself, and try to report them before the originator node. Solving this may require working with Stanford to make some modifications to their system (such as an ability to make statistics private unless queried by username directly). But it is probably a good starting point.

I’ve already got several folks who are interested in contributing to this project, so I’ll probably set up a team on GitHub where we can build out the block chain for the “Folding at Home Coin” (will need a better name…) If anyone here is interested in contributing, I’ll post a link once I have it up.