Git Product home page Git Product logo

Comments (10)

katajakasa avatar katajakasa commented on August 17, 2024

Right. There was talk about this on our irc channel. I suggested that we could plug in a Lua interpreter, and we could write the bot AIs on Lua. This would gain us:

  • A clearly set API
  • Easy to write & test; no need to recompile and restart the game
  • Easy for people to add new AIs

This would of course add one more dependency, though.

from openomf.

katajakasa avatar katajakasa commented on August 17, 2024

We should probably have #123 working before we start with AI.

from openomf.

animehunter avatar animehunter commented on August 17, 2024

We should allow the AI to be written in both C and Lua because not everyone is comfortable with Lua.

from openomf.

katajakasa avatar katajakasa commented on August 17, 2024

I think we should only pick one, either C or Lua. If people are more used to writing in C, then let's use C. I don't want to start supporting multiple ways doing this when one ought to be enough for everybody :)

from openomf.

tb2097 avatar tb2097 commented on August 17, 2024

I'm "more comfortable" programming in C personally, but there is benefit to coding in LUA as mentioned - iteration without recompiling. Although the initial dependency will likely be annoying to add, it'll make future additions/modifications easier. Several other games already use LUA for these systems, which will be useful.

As mentioned on the forums I'll try to get all the logistics info from OMF: BG how the logic is handled for the bots - no time frame though as it depends on my limited free time. My primary goal is to get all the pilots out first, which shouldn't take too long as I have all the pretty webify-ing stuff in place already for it so people can easily view it.

Malfrex

from openomf.

katajakasa avatar katajakasa commented on August 17, 2024

tb2097: Thanks. I don't know how much of that information we can actually use in openomf, but it would at least give us some insight on how AI can be handled in fighter games.

from openomf.

katajakasa avatar katajakasa commented on August 17, 2024

About Lua vs. C ... Since most people are in favor of C, it might make sense to just reveal an API for the AI's and load them as DLL's. The API i was thinking (from DLL perspective) would be something like this:

  • Function for registering/unregistering HAR event callbacks (using the new API rewritten by Vagabond). The events would be stuff like "you were punched/kicked", etc.
  • Function for registering/unregistering Arena event callbacks. The events could be stuff like, combat starts, combat ends, arena ends, etc.
  • HAR data needs to be revealed to the DLL (eg. type, armor, leg/arm speed/power, stun res, etc.). This could probably be done by just letting the DLL grab a reference to the structs ?
  • Pilot data needs to be revealed (tendencies, agility/strength/etc. values). Could possibly be implemented the same way as above ?
  • Anything else ?

from openomf.

Vagabond avatar Vagabond commented on August 17, 2024

Would it not be easier to just implement a simple AI and generalize the interface from there, if we ever needed another AI impl?

from openomf.

animehunter avatar animehunter commented on August 17, 2024

After some experiments, I've successfully implemented a very dumb AI by creating a new controller.
The things I used are:

  • HAR events (API by Vagabond)
  • Move data (af_move*)
  • HAR data (har*)

I believe those items above are the bare minimum that should be revealed to the DLL and LUA scripts.

from openomf.

animehunter avatar animehunter commented on August 17, 2024

We have a basic AI implemented in master...... so closing.

from openomf.

Related Issues (20)

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.