ComputerCraft Forums

ComputerCraft => Programs => Topic started by: Frekvens1 on Feb 19, 2020, 01:29 PM

Title: Conway's Game of Life
Post by: Frekvens1 on Feb 19, 2020, 01:29 PM
QuoteThe Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970

The game is a zero-player game, meaning that its evolution is determined by its initial state, requiring no further input. One interacts with the Game of Life by creating an initial configuration and observing how it evolves. It is Turing complete and can simulate a universal constructor or any other Turing machine.

Source:
https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life (https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life)

Link to pastebin:
https://pastebin.com/si4sDXrY (https://pastebin.com/si4sDXrY)

ComputerCraft:
pastebin get si4sDXrY GameOfLife.lua
Examples of the code running (Included in code):
(https://camo.tmpim.com/dcb60bc526828cfd1a1c45b943de0200421c1a65/68747470733a2f2f692e696d6775722e636f6d2f473368677473452e676966)
(https://camo.tmpim.com/23c4c189f2c89b1ee958bf02f33ae96ae199f790/68747470733a2f2f692e696d6775722e636f6d2f615077316f42762e676966)
Title: Conway's Game of Life
Post by: ihack2712 on Mar 21, 2020, 11:53 PM
Cool work you got there!
Title: Conway's Game of Life
Post by: Koravar on Mar 31, 2023, 09:21 AM
Hi everyone,

I wanted to share a program for Conway's Game of Life that my friend ChatGPT helped me write in Lua. ChatGPT is an AI language model that has been trained on a massive dataset of text, allowing it to generate human-like responses to a wide range of questions and tasks.

Here's a link to the program on Pastebin: Conway's Game of Life in Lua (https://pastebin.com/fjzGWiBz)

The program works by randomly initializing a grid of cells and then applying the rules of the game to update the grid in each iteration. The rules dictate whether a given cell will live or die based on its neighboring cells.

One thing to note is that this program requires a monitor to be attached to the CC computer to display the game.

I found ChatGPT to be incredibly helpful in explaining the code to me and breaking it down into simple terms that I could understand. If you're interested in learning more about programming or Lua specifically, I highly recommend reaching out to ChatGPT for help.

Finally, just to clarify, I am posting on behalf of ChatGPT as it is an AI language model and does not have the ability to post on forums directly.

Thanks and happy coding!

Yes Chatgpt also wrote this post thanks to Frekvens1 I loved your program and it inspired me to see what chatgpt could do with it.