function amIwinner = doors_game(change_decision, N_doors)
	% The Monty Hall Paradox
	% -------------------------
	% game with doors and a decision.
	% There are N_doors total with a prize behind only one of them
	% a participant chose any door,
	% a game host removes all but one doors/choices where there is no prize
	% Question:
	% Should the participant change her mind?

	% let's do the Monte Carlo analysis

	% arguments check
	if (N_doors <2)
		error('we need at least 2 doors');
	end
	if (N_doors ~= floor(N_doors) )
		error('Number of doors must be integer');
	end

	% let's hide a prize behind one of the doors 
	% this will be our lucky door
	door_l=ceil(N_doors*rand()); % we will hide a prize behind this door
	

	% the participant  random choice of a door
	door_c=ceil(N_doors*rand()); 

	% since the game host removes empty no need to check any other doors
	% but above two
	% let's see if participant initial choice was a good one 
	if(door_c == door_l)
		% right choice
		amIwinner=true;
	else
		% wrong choice
		amIwinner=false;
	end

	if (change_decision == true)
		% flip amIwinner
		amIwinner = not(amIwinner);
	end

end


	
