Question: In Python with a VScode WSL terminal... please program an entire, working two - player game: the L game, invented by Edward de Bono. The
In Python with a VScode WSL terminal... please program an entire, working twoplayer game: the L game, invented by Edward de Bono. The game consists of a x grid, one x Lshaped piece for each player, and two x neutral pieces. The initial positions are specified. At each turn, a player must first move its L piece to a new position that is free ie within the grid and not overlapping with the other L and the neutral pieces; and then may move one of the neutral pieces to any free position or may choose not to move any neutral piece The game finishes when a player cannot move its L piece to any position.
Please follow these guidelines
At a minimum, your program should do the following:
Implement minimax and heuristic alphabeta pruning up to a userprovided depth d possibly infinite
Implement a heuristic evaluation function.
Define a representation for the states, legal actions and the result of applying a legal action to a state.
Plot the board and pieces as the game progresses.
Take as input from the keyboard a human move and print the computer move in the same format throughout the game this is to make it possible to have one group's program play against another
Note: you must represent this as in the following example: E where are the xy coordinates of the corner of the L where is the top left grid position and E is the orientation of the foot of the L out of North, South, East, West; and a neutral piece is moved from to If not moving a neutral piece, omit the part
Allow the user to provide an initial game state different from the default one
Note: you must represent this as in the following example corresponding to the default initial state: W E L that moves first, the two neutral pieces, L that moves second
Allow the user to select who makes the first move computer or human
Implement three versions: human vs human, human vs computer, computer vs computer.
The implementation should be efficient, in particular regarding the use of appropriate data structures. Runtime needs to be good.
Please provide the entirety of the Python Code Not AI generated please No pseudocode either, please give me the python code in full. The code should be able to be run using "python Lgame.py
The entirety of the code should just be one python file: Lgame.py
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
