-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Design and implement more capabilities and devices #26
Comments
I would really like to link the “counter” to a small solar panel and have a pocket calculator with arithmetic capability. 🧮 |
I like that idea! =) I had some vague thoughts about making an "ALU" but I like this better. What should be the recipe for a solar panel? |
Sorry for the late reply @byorgey. I think solar panel mainly needs glass and some copper wires. It would be really nice to only add sand on water beaches, but I am not sure if the noise function in water terrain generation would work for that. Assuming we had sand, I imagine the recipes would be:
I only used 3D-printer to look fancy and avoid making recipe for cadmium telluride or something like that. 😏 |
Yes, adding sand would be nice. I think we could probably find a way to put sand around the edges of water. We would have to play with it. (Filed as #336.) A 3D printer does make it look fancy, but that means that only the base will be able to carry out those recipes at first --- for automation's sake I think we should make it possible for other robots to make these recipes. |
swarm/src/Swarm/Language/Capability.hs Lines 274 to 310 in 7d2339f
|
As described in #26 (comment) `calculator` device provides `arith` capability.
Some additional ideas related to #361 . I want to wait until #373 lands and then add these things.
Started implementing these things on https://github.com/swarm-game/swarm/tree/quartz . |
Ideas for a device to give the Recipe?
I think we want comparison to be available pretty early. All the basic things you want to do with arithmetic (e.g. writing OK, this is now also in https://github.com/swarm-game/swarm/tree/quartz . |
- Add quartz and quartz mines - Add `clock`, `silicon`, and `circuit` - Add `comparator` device - Metal drills can now drill through boulders too - Add pixels to the world, and recipes for `camera` and `scanner` See discussion at #26 (comment) and #361 .
Didn't realize we have a |
I think we should just get rid of the |
@byorgey I was thinking But |
How about making a |
Or how about combining a |
Ah, those are all good ideas, let's keep it. |
Idea for
|
- remove `raise` command - rename `error` to `fail` - should suggest both that it is: - recoverable - can be caught with `try` - pure - `fail: string -> a` - so it can be used outside `cmd` --- The problem with `raise` was that it was merely a specialized version of `error` (which was not limited to `cmd a`): ``` let raised: string -> cmd a = error in raised "ha" ``` I noticed this while making the list for #26. On a meta-level, it also conflicts with the `raise` Haskell function we use to throw an error when a command (like `build`) fails.
@byorgey do we need that? If #495 is implemented, the program will be inlined and checked for capabilities when hitting Enter in REPL. Unless I am missing something it should not give you any extra power than copy-pasting. In particular, you would not be able to do:
|
Oh, I totally agree with you. I wrote that comment a while ago before thinking things through more in #495. |
I will also remove We can imagine that speaking is natural to robots, perhaps they just bang the robot shell or whizz with the motor to signal. 🤔 |
Pouring water on yourself to Honestly self-destructing doesn't seem very useful except for system robots. Maybe we should just make it a |
I guess using I can imagine situations where you would want to get rid of the robot quickly without collecting it with Also, it is just nice from an aesthetic standpoint - once I can create as many robots as I like, I will eventually not want to bother with salvaging them to clean my map view, unless they had an important task. |
OK, sure.
Yes, good point, you've convinced me. 😄 |
Initial list of commands in the commands dialog now includes any commands which - require a capability provided by an installed device - require a capability provided by a device in the inventory, or - do not require any capability. Right now there are too many things in the list because we need to finish #26 , but that's a separate issue of course. Closes #588 .
While we no longer plan to finish this issue for the Alpha release, it is IMO good to leave it pinned. 📌 If anyone has a good idea for devices/recipes feel free to discuss it here, in a separate Issue or on IRC. 🙂 |
Add a new `GPS receiver` device which enables the `senseloc` capability (and hence the `whereami` command). Towards #26 . - My immediate motivation is that I want to be able to define `excursion : cmd unit -> cmd unit` which executes the given command and then returns to the same location and orientation as before. Being able to use the `whereami` command is one of the last missing pieces of machinery necessary to be able to do this in classic mode (the other is a `heading` command, see #955). - The proposed recipe for `GPS receiver` is `antenna + circuit + clock + compass`, which is a somewhat difficult recipe (`antenna` requires `silver` which requires a `deep mine`; a `clock` requires `quartz` + a bunch of `iron gears`, etc.). One might wonder whether we should make the recipe easier since finding out where you are seems like a kind of fundamental operation. However, consider that in order to even be able to make use of the result of `whereami` you need at least (1) an `ADT calculator` to deal with the pair (which transitively requires `typewriter` -> `circuit` -> `silicon` -> `quartz`) (2) probably things like `comparator` and `calculator` to do anything useful with the coordinates. By the time you have those things you can definitely already build `circuit` + `clock` + `compass`, and you're probably not that far away from getting some `silver` for an `antenna`. Also, in practice it's an interesting/fun constraint to build up machinery that has to work entirely based on *relative* position without being able to find out your absolute coordinates. - For some reason this is causing `Testing/508-capability-subset` to fail. I think perhaps it is due to #397 ? I will investigate. *EDIT*: unfortunately, that wasn't it!
Towards #26. See [Groucho glasses](https://en.wikipedia.org/wiki/Groucho_glasses) 🥸
There are only two items left (creating a device for |
There are quite a few capabilities that are missing; see the comments in Swarm.Language.Capability. This will require some creative thinking and careful planning and testing.
Here is a list of commands and related issues (TODO):
view
a limited broadcast range #17clock
providetime
capability #402Here is the list of capabilities that are missing devices:
teleport
capability #1041create(Create) make restricted instead in Remove create capability #408Here is a list of devices that provide a capability but are missing a recipe (see also #361):
In addition, the following commands require god capability and are currently only intended for scenario development and not available to players (except for creative mode):
Since #373 the exception users will see if there are no devices to provide required capability looks like this:
Restricted commands give different message:
The text was updated successfully, but these errors were encountered: