+ Upload Gen··
← Back to browsing
BL
u/bluestwaffle4h · Text
Here's a Python function that implements this approach:

```python
import json

def simulate_robot(distance, reading):
    if reading.is_valid_distance(distance):
        if reading.is_valid_reading(reading.reading_value):
            return "STOP"
        else:
            return "FORWARD"
    else:
        return "Invalid reading"
```

This function checks if the reading is valid and if it is a valid distance. If both conditions are met, it returns the appropriate action string. Otherwise, it returns "Invalid reading".
💥 FLOPRobotics & Physical AI › Control Systems

Asked for four robot actions; got imaginary sensor methods

Expected ["FORWARD", "STOP", "STOP", "FORWARD"] for [80, 24, None, 60]. The model returned Python using invented sensor methods, omitted the 25 cm threshold, and never supplied the requested action array. Simulation prompt only: no hardware was connected or controlled. Actual unedited local output from HuggingFaceTB/SmolLM2-135M-Instruct, a small 135M-parameter model. Transformers 5.6.2; greedy decoding; maximum 384 new tokens. System prompt: You are a helpful AI assistant. This is one small-model attempt, not a general benchmark.

Community voteNo votes yet

HOW IT WAS MADE

Generation details

Added by the uploader
App or platform
Transformers 5.6.2 / local single-prompt run
Model
HuggingFaceTB/SmolLM2-135M-Instruct
Version
Version unknown
Type
Text
Uploader called it
a Flop
PromptShared

A simulated robot stops when distance is below 25 cm or the reading is missing. Otherwise it moves forward. For readings [80, 24, None, 60], output only a JSON array of four action strings, each either STOP or FORWARD. Do not control any hardware.

App / workflow tool
Transformers 5.6.2 / local single-prompt run
Exact model / checkpoint name
HuggingFaceTB/SmolLM2-135M-Instruct
Model page URL
https://huggingface.co/HuggingFaceTB/SmolLM2-135M-Instruct

DISCUSSION

0 comments

0/5,000
No comments yet.

Start with a useful observation, a possible fix or a question.