You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							21 lines
						
					
					
						
							273 B
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							21 lines
						
					
					
						
							273 B
						
					
					
				| mdp | |
| const int N; | |
| 
 | |
| const double p = 0.5; | |
| 
 | |
| module main | |
| 	x : [0..N] init N/2; | |
| 	 | |
| 	[right] x<N -> p : (x'=x+1) + (1-p) : (x'=x); | |
| 	[left] x>0 -> p : (x'=x-1) + (1-p) : (x'=x); | |
| 	 | |
| endmodule | |
| 
 | |
| rewards "r" | |
|  [right] true : 1; | |
|  endrewards | |
|   | |
| 
 | |
|  rewards "l" | |
|   [left] true : 1; | |
|   endrewards |