repo structure
This commit is contained in:
		
							
								
								
									
										
											BIN
										
									
								
								strat/__pycache__/main.cpython-38.pyc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								strat/__pycache__/main.cpython-38.pyc
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								strat/__pycache__/rand.cpython-38.pyc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								strat/__pycache__/rand.cpython-38.pyc
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										13
									
								
								strat/main.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								strat/main.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,13 @@
 | 
			
		||||
import numpy as np
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def decision(h1, h2):
 | 
			
		||||
    if len(h1) == 0:
 | 
			
		||||
        r = np.random.randint(2)
 | 
			
		||||
        return r
 | 
			
		||||
    else:
 | 
			
		||||
        avg = 1.0 * sum(h1) / len(h1)
 | 
			
		||||
        if avg <= 0.5:
 | 
			
		||||
            return 0
 | 
			
		||||
        else:
 | 
			
		||||
            return 1
 | 
			
		||||
							
								
								
									
										13
									
								
								strat/rand.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								strat/rand.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,13 @@
 | 
			
		||||
import numpy as np
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def decision(h1, h2):
 | 
			
		||||
    if len(h2) == 0:
 | 
			
		||||
        r = np.random.randint(2)
 | 
			
		||||
        return r
 | 
			
		||||
    else:
 | 
			
		||||
        avg = 1.0 * sum(h2) / len(h2)
 | 
			
		||||
        if avg <= 0.5:
 | 
			
		||||
            return 0
 | 
			
		||||
        else:
 | 
			
		||||
            return 1
 | 
			
		||||
		Reference in New Issue
	
	Block a user