Coder Social home page Coder Social logo

argue's Introduction

What is this?

A web-app where you prove statements using logic and chat-gpt.
The frontend uses react-force-graph to visualize the statements and their relations.

Setup:

  1. Dependencies: npm, rust
  2. in .\argue-react:
    1. npm install
    2. configure .env
    3. npm run build
  3. configure .env
  4. Put your openai api key in new file openai.key

run Client only

run npm start in argue-react

run Server

run cargo run in root folder

Documentation

Client ws-messages

"GetGameState"
{"Add":{"statement":"..."}}
{"Delete":{"id":[0,0]}}
{"Edit":{"id":[0,0],"statement":"..."}}
{"Link":{"premise":[0,0],"conclusion":[0,0]}}
{"Unlink":{"premise":[0,0],"conclusion":[0,0]}}
{"ProveDirect":{"id":[0,0]}}
{"ProveImplication":{"id":[0,0]}}

Example:

{"Add":{"statement":"Socrates is a man."}}
{"Add": {"statement":"Every man is mortal."}}
{"Add": {"statement": "Socrates is mortal."}}
{"Link":{"premise":[1,0],"conclusion":[3,0]}}
{"Link":{"premise":[2,0],"conclusion":[3,0]}}
{"ProveImplication":{"id":[3,0]}}
{"ProveDirect":{"id":[1,0]}}
{"ProveDirect":{"id":[2,0]}}

Server ws-messages

STATE = None|DirectlyProven|ImpliedUnproven|ImpliedProven

{"NewNodeId":{"id":[0,0]}}
{"GameState":{"statements":[{"id":[0,0],"statement": "...","state": "STATE","parents":[[0,0]],"children": [[0,0]],},]}, "root": [0,0]}
{"Comment":{"id":[0,0],"comment": "...","success": false}}
"Win"
{"AICooldown":{"seconds":15}}
{"Error":{"NoSuchNode":[0,0]}}
{"Error":"RemoveRoot"}
{"Error":{"AddExistingLink":{"child":[0,0],"parent":[0,0]}}}
{"Error":{"RemoveNonExistentLink":{"child":[0,0],"parent":[0,0]}}}

argue's People

Contributors

comeza avatar vlle1 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.