# Finally Here: Twitch Solves a Rubiks Cube!



## Deleted member 19792 (Mar 31, 2014)

It is finally here!

*NOTE: THIS IS OPEN BETA! THERE WILL BE PAUSES IN THE STREAM! SUGGEST THINGS BELOW*

I will update you when the stream is on, and off. 

Commands are in the description

IF THE COMMANDS DO NOT GO THROUGH, IT MEANS THE BOT IS TURNED OFF AS I AM UPDATING THE CODE WHILE I WORK ON IT!!!!!


Link: www.twitch.tv/officialstrakerak


*THE STREAM IS CURRENTLY ON!!!!!*


----------



## (X) (Mar 31, 2014)

Very cool idea 

You need to make the description clearer, it's really a mess now, there are no seperation between different moves. 
I also think you should wait with making it live until it works perfect.

Are you gonna implement the democracy feature?

anyway I'll follow this project


----------



## Deleted member 19792 (Apr 1, 2014)

(X) said:


> Very cool idea
> 
> You need to make the description clearer, it's really a mess now, there are no seperation between different moves.
> I also think you should wait with making it live until it works perfect.
> ...



Soon enough, but I can't really implement right now :/


----------



## RageCuber (Apr 1, 2014)

No democracy, PLEASE!!! It "ruined" twitch plays pokemon.


----------



## Kirjava (Apr 1, 2014)

I don't think it ruined it. Democracy would probably work better for 3x3x3.


----------



## Tim Major (Apr 1, 2014)

RageCuber said:


> No democracy, PLEASE!!! It "ruined" twitch plays pokemon.



Pokemon you make progress and unless you really screw up you can't lose that progress (RIP Abby)
With a cube a single wrong move can undo all progress.

Combined with a 30 second delay, this cube would never get solved with anarchy.


----------



## DeeDubb (Apr 1, 2014)

Is there some way to stop when the cube is solved? Otherwise, it might get solved and immediately rescrambled.


----------



## Deleted member 19792 (Apr 1, 2014)

Update:

I will try to implement democracy mode.

Once the cube is solved, you can type "scramble" to scramble it.


----------



## brian724080 (Apr 1, 2014)

Hopefully not too many trolls/non-cubers come on


----------



## Deleted member 19792 (Apr 1, 2014)

Well it looks like I can't really come up with a democracy filter in python. If anyone is willing to help PM me.


Stream is off now. School internet sucks


----------



## brian724080 (Apr 1, 2014)

Does that mean that people vote on which moves to do?


----------



## DeeDubb (Apr 1, 2014)

strakerak said:


> Well it looks like I can't really come up with a democracy filter in python. If anyone is willing to help PM me.
> 
> 
> Stream is off now. School internet sucks



I haven't done programming in a while, but can you create integer variables for each move "R=0 L=0 U=0..." etc, and then take input for, let's say 10 seconds, each valid move is a ++ to the variable "If input = "R", R++". Then at the end of the 10 seconds, see which one has the highest value, and execute that move. If there's a tie, you can have another function to randomly pick one of them. I'm not sure how much goes into this process, but if you want, you can send me the python code, and I'll take a look. I'm not an expert, but I'm decent.


----------



## Deleted member 19792 (Apr 1, 2014)

brian724080 said:


> Does that mean that people vote on which moves to do?



Yes.


----------



## Stefan (Apr 1, 2014)

strakerak said:


> Well it looks like I can't really come up with a democracy filter in python.



What's the problem?



DeeDubb said:


> I haven't done programming in a while, but can you create integer variables for each move "R=0 L=0 U=0..." etc, and then take input for, let's say 10 seconds, each valid move is a ++ to the variable "If input = "R", R++".



Separate variables and ifs for each move are bad. Better done with just one dict or even Counter.


```
from collections import Counter
inputs = 'URLDFLDLFUBBDUBLRtroooooool'
print(max('UDLRFB', key=Counter(inputs).get))
```
Try at http://ideone.com/bXZUAw


----------



## Deleted member 19792 (Apr 1, 2014)

Stefan said:


> What's the problem?




I can't really figure out how to create a 20-second timer to gather the most votes and such


----------



## ajayd (Apr 2, 2014)

You could always use time.time, and wait for the elapsed time to equal 20 seconds?


----------



## ajayd (Apr 2, 2014)

Oh, oops, right, that's how time.time works. Would time.sleep work, or is the program halted then, rendering any input useless? (Sorry, I don't use the time module very much)

EDIT: Where'd Stefan's post go?


----------



## Stefan (Apr 2, 2014)

ajayd said:


> EDIT: Where'd Stefan's post go?



Deleted, wasn't informative/funny enough.


----------



## RageCuber (Apr 2, 2014)

I revoke part of my previous statement. democracy did "ruin" pokemon, but It's the only way for it to work well
on a cube. Also, just an idea if you do use anarchy, maybe you could input entire algorithms if entered at the 
right time.


----------



## Deleted member 19792 (Apr 3, 2014)

RageCuber said:


> I revoke part of my previous statement. democracy did "ruin" pokemon, but It's the only way for it to work well
> on a cube. Also, just an idea if you do use anarchy, maybe you could input entire algorithms if entered at the
> right time.



The problem with complete algorithms is that if two people put a complete alg (before democracy mode) Then both algs will be executed.. That gets annoying.

I can integrate permutations. But that would be a bit hard.

If anyone is willing to collaborate with me on the democracy mode, please PM me about it. I would like to get an official stream up for use in the next few weeks.

For those who are wondering about MarathonTimer, I need to renew the programming tools in order to continue using it. So there is a delay on that.




ajayd said:


> You could always use time.time, and wait for the elapsed time to equal 20 seconds?




Could you emphasize on that? And also, it has to count up votes :/



UPDATE:

I am currently discussing with the school to have a constant overnight internet connection in order to make this work smoothly. If not, I can always wait two weeks and go home and turn a laptop on to be permanent.


----------

