Write a program that uses a 20x20 board, initialised to a given pattern, to play the game Conway's life . After each turn print out the board pattern using a . for a dead square and a * for a live square. Squares off the board are considered permanently dead.

To write a program that plays Conway's Game of Life on a 20x20 board, you can follow these steps:

1. Initialize the board pattern: Create a 20x20 2D array to represent the board. Set the initial pattern according to your requirements.

2. Create a function to print the board pattern: Iterate through each cell in the 2D array and print a "." for a dead cell and a "*" for a live cell.

3. Create a function to get the next generation: Implement the rules of Conway's Game of Life to determine the state of each cell in the next generation based on its neighbors. Store the updated state in a new 2D array.

4. Create a loop to iterate the generations: Use a loop to repeat the process of calculating the next generation and updating the board pattern. Print the pattern after each turn using the function created in step 2.

Here's a sample implementation in Python:

```python
import time

# Initialize the board pattern
board = [[0] * 20 for _ in range(20)]
# Set the initial pattern (example: glider)
board[1][2] = 1
board[2][3] = 1
board[3][1] = 1
board[3][2] = 1
board[3][3] = 1

# Function to print the board pattern
def print_board(board):
for row in board:
for cell in row:
print('.' if cell == 0 else '*', end=' ')
print()

# Function to get the next generation
def get_next_generation(board):
new_board = [[0] * 20 for _ in range(20)]
directions = [(1, 0), (1, 1), (0, 1), (-1, 1), (-1, 0), (-1, -1), (0, -1), (1, -1)]

for i in range(20):
for j in range(20):
live_neighbors = 0
for dx, dy in directions:
ni, nj = i + dx, j + dy
if 0 <= ni < 20 and 0 <= nj < 20 and board[ni][nj] == 1:
live_neighbors += 1

if board[i][j] == 1 and (live_neighbors == 2 or live_neighbors == 3):
new_board[i][j] = 1
elif board[i][j] == 0 and live_neighbors == 3:
new_board[i][j] = 1

return new_board

# Loop to iterate the generations
for generation in range(10): # Change the value as desired
print(f"Generation {generation}")
print_board(board)
board = get_next_generation(board)
time.sleep(1) # Delay between generations (optional)
```

In this example, the initial pattern is a glider. The code calculates and prints 10 generations of the game, with a 1-second delay between each generation. You can modify the initial pattern, number of generations, and the delay as per your needs.