Code Monkey home page Code Monkey logo

chatgpt-game-comment's Introduction

Am I Fighting Well? Fighting Game Commentary Generation With ChatGPT

This repository contains the code for the paper "Am I Fighting Well? Fighting Game Commentary Generation With ChatGPT" accepted at IAIT 2023.

Abstract

This paper presents a new approach for leveraging ChatGPT in fighting game commentary generation task. Commentary generation often relies on deep learning techniques, which typically demand extensive data to achieve effectiveness. Large language models (LLMs) have become essential due to their remarkable ability to process data efficiently, thanks to their extensive training on vast datasets. Our proposed approach integrates the use of LLMs, specifically the GPT-3.5 model, for generating commentaries through the utilization of various prompts with data from the open-source fighting game, DareFightingICE. Four prompt variants are employed to assess the effectiveness of each prompt components. Objective evaluation using natural language metrics reveals that different prompt components significantly affect the generated commentaries. Additionally, subjective evaluation through a questionnaire reveals that prompts without parameter definitions received the highest preference from human evaluators. These results suggest that LLMs exhibit versatility in generating fighting game commentaries and hold promise for broader applications.

File structure

  • main.py: The main script for story generation and ending evaluation.
  • requirements.txt: The requirements file for the project.
  • example.py: example of how to utilize the code
  • eval.py: evaluation runner
  • outputs/: The directory containing the generated results from ChatGPT.
  • src/: The directory containing utility files for main.py
  • data/: The directory containing word lists used for data generation process.
  • logs: The directory containing log of the experiment.

Installation and Usage

  1. Create a virtual environment (if needed):
conda create -n chatgpt-game-comment python=3.11

and activate it:

conda activate chatgpt-game-comment
  1. Copy .env.example and rename it to .env. Follow instructions on this page to obtain your own OpenAI API key.
  2. Install the requirements:
pip install -r requirements.txt
  1. Change src/config.py as needed
  2. Run the script for experiment:
python main.py

chatgpt-game-comment's People

Contributors

staciiaz avatar pittawat2542 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.